[ 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  -  FREEBSD10  -  FREEBSD9  -  FREEBSD92  -  FREEBSD91  -  FREEBSD90  -  FREEBSD8  -  FREEBSD82  -  FREEBSD81  -  FREEBSD80  -  FREEBSD7  -  FREEBSD74  -  FREEBSD73  -  FREEBSD72  -  FREEBSD71  -  FREEBSD70  -  FREEBSD6  -  FREEBSD64  -  FREEBSD63  -  FREEBSD62  -  FREEBSD61  -  FREEBSD60  -  FREEBSD5  -  FREEBSD55  -  FREEBSD54  -  FREEBSD53  -  FREEBSD52  -  FREEBSD51  -  FREEBSD50  -  FREEBSD4  -  FREEBSD3  -  FREEBSD22  -  cheribsd  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1  -  FREEBSD-LIBC  -  FREEBSD8-LIBC  -  FREEBSD7-LIBC  -  FREEBSD6-LIBC  -  GLIBC27 
SearchContext: -  none  -  3  -  10 

    1 # $FreeBSD: src/sys/conf/kern.mk,v 1.45 2005/03/31 22:53:58 peter Exp $
    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 .if ${CC} == "icc"
   10 #CWARNFLAGS=    -w2     # use this if you are terribly bored
   11 CWARNFLAGS=
   12 .else
   13 CWARNFLAGS?=    -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
   14                 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
   15                 -fformat-extensions -std=c99
   16 .endif
   17 #
   18 # The following flags are next up for working on:
   19 #       -W
   20 
   21 #
   22 # On the i386, do not align the stack to 16-byte boundaries.  Otherwise GCC
   23 # 2.95 adds code to the entry and exit point of every function to align the
   24 # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
   25 # per function call.  While the 16-byte alignment may benefit micro benchmarks, 
   26 # it is probably an overall loss as it makes the code bigger (less efficient
   27 # use of code cache tag lines) and uses more stack (less efficient use of data
   28 # cache tag lines).  Explicitly prohibit the use of SSE and other SIMD
   29 # operations inside the kernel itself.  These operations are exclusively
   30 # reserved for user applications.
   31 #
   32 .if ${MACHINE_ARCH} == "i386" && ${CC} != "icc"
   33 CFLAGS+=        -mno-align-long-strings -mpreferred-stack-boundary=2 \
   34                 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
   35 INLINE_LIMIT?=  8000
   36 .endif
   37 
   38 #
   39 # On the alpha, make sure that we don't use floating-point registers and
   40 # allow the use of BWX etc instructions (only needed for low-level i/o).
   41 # Also, reserve register t7 to point at per-cpu global variables.
   42 #
   43 .if ${MACHINE_ARCH} == "alpha"
   44 CFLAGS+=        -mno-fp-regs -ffixed-8 -Wa,-mev6
   45 INLINE_LIMIT?=  15000
   46 .endif
   47 
   48 .if ${MACHINE_ARCH} == "arm"
   49 INLINE_LIMIT?=  8000
   50 .endif
   51 #
   52 # For IA-64, we use r13 for the kernel globals pointer and we only use
   53 # a very small subset of float registers for integer divides.
   54 #
   55 .if ${MACHINE_ARCH} == "ia64"
   56 CFLAGS+=        -ffixed-r13 -mfixed-range=f32-f127 -mno-sdata
   57 INLINE_LIMIT?=  15000
   58 .endif
   59 
   60 #
   61 # For sparc64 we want medlow code model, and we tell gcc to use floating
   62 # point emulation.  This avoids using floating point registers for integer
   63 # operations which it has a tendency to do.
   64 #
   65 .if ${MACHINE_ARCH} == "sparc64"
   66 CFLAGS+=        -mcmodel=medlow -msoft-float
   67 INLINE_LIMIT?=  15000
   68 .endif
   69 
   70 #
   71 # For AMD64, we explicitly prohibit the use of FPU, SSE and other SIMD
   72 # operations inside the kernel itself.  These operations are exclusively
   73 # reserved for user applications.
   74 #
   75 .if ${MACHINE_ARCH} == "amd64"
   76 CFLAGS+=        -mcmodel=kernel -mno-red-zone \
   77                 -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow \
   78                 -msoft-float -fno-asynchronous-unwind-tables
   79 INLINE_LIMIT?=  8000
   80 .endif
   81 
   82 #
   83 # For PowerPC we tell gcc to use floating point emulation.  This avoids using
   84 # floating point registers for integer operations which it has a tendency to do.
   85 #
   86 .if ${MACHINE_ARCH} == "powerpc"
   87 CFLAGS+=        -msoft-float
   88 INLINE_LIMIT?=  15000
   89 .endif
   90 
   91 #
   92 # GCC 3.0 and above like to do certain optimizations based on the
   93 # assumption that the program is linked against libc.  Stop this.
   94 #
   95 .if ${CC} == "icc"
   96 CFLAGS+=        -nolib_inline
   97 .else
   98 CFLAGS+=        -ffreestanding
   99 .endif
  100 
  101 .if ${CC} == "icc"
  102 CFLAGS+=        -restrict
  103 .endif

Cache object: f2912dab0ea268d7db3932532f11b9ac


[ 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.