The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/conf/kern.mk

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # $FreeBSD: releng/5.2/sys/conf/kern.mk 122085 2003-11-04 23:29:17Z peter $
    2 
    3 #
    4 # Warning flags for compiling the kernel and components of the kernel.
    5 #
    6 # Note that the newly added -Wcast-qual is responsible for generating 
    7 # most of the remaining warnings.  Warnings introduced with -Wall will
    8 # also pop up, but are easier to fix.
    9 CWARNFLAGS?=    -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
   10                 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
   11                 -fformat-extensions -std=c99
   12 #
   13 # The following flags are next up for working on:
   14 #       -W
   15 
   16 #
   17 # On the i386, do not align the stack to 16-byte boundaries.  Otherwise GCC
   18 # 2.95 adds code to the entry and exit point of every function to align the
   19 # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
   20 # per function call.  While the 16-byte alignment may benefit micro benchmarks, 
   21 # it is probably an overall loss as it makes the code bigger (less efficient
   22 # use of code cache tag lines) and uses more stack (less efficient use of data
   23 # cache tag lines)
   24 #
   25 .if ${MACHINE_ARCH} == "i386"
   26 CFLAGS+=        -mno-align-long-strings -mpreferred-stack-boundary=2
   27 INLINE_LIMIT?=  15000
   28 .endif
   29 
   30 #
   31 # On the alpha, make sure that we don't use floating-point registers and
   32 # allow the use of BWX etc instructions (only needed for low-level i/o).
   33 # Also, reserve register t7 to point at per-cpu global variables.
   34 #
   35 .if ${MACHINE_ARCH} == "alpha"
   36 CFLAGS+=        -mno-fp-regs -ffixed-8 -Wa,-mev6
   37 INLINE_LIMIT?=  15000
   38 .endif
   39 
   40 #
   41 # For IA-64, we use r13 for the kernel globals pointer and we only use
   42 # a very small subset of float registers for integer divides.
   43 #
   44 .if ${MACHINE_ARCH} == "ia64"
   45 CFLAGS+=        -ffixed-r13 -mfixed-range=f32-f127 -mno-sdata
   46 INLINE_LIMIT?=  15000
   47 .endif
   48 
   49 #
   50 # For sparc64 we want medlow code model, and we tell gcc to use floating
   51 # point emulation.  This avoids using floating point registers for integer
   52 # operations which it has a tendency to do.
   53 #
   54 .if ${MACHINE_ARCH} == "sparc64"
   55 CFLAGS+=        -mcmodel=medlow -msoft-float
   56 INLINE_LIMIT?=  15000
   57 .endif
   58 
   59 #
   60 # For AMD64, use a medium model for now.  We'll switch to "kernel"
   61 # once pmap is ready.  Be excessively careful to not generate FPU code.
   62 #
   63 .if ${MACHINE_ARCH} == "amd64"
   64 CFLAGS+=        -mcmodel=kernel -mno-red-zone \
   65                 -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow \
   66                 -msoft-float -fno-asynchronous-unwind-tables
   67 INLINE_LIMIT?=  20000
   68 .endif
   69 
   70 #
   71 # GCC 3.0 and above like to do certain optimizations based on the
   72 # assumption that the program is linked against libc.  Stop this.
   73 #
   74 CFLAGS+=        -ffreestanding

Cache object: 6abc466b343ab476e9309bc1ebf8bd18


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.