FreeBSD/Linux Kernel Cross Reference
sys/conf/kern.mk
1 # $FreeBSD: releng/5.0/sys/conf/kern.mk 105019 2002-10-13 02:52:22Z marcel $
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 -ansi
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 .endif
28
29 #
30 # On the alpha, make sure that we don't use floating-point registers and
31 # allow the use of BWX etc instructions (only needed for low-level i/o).
32 # Also, reserve register t7 to point at per-cpu global variables.
33 #
34 .if ${MACHINE_ARCH} == "alpha"
35 CFLAGS+= -mno-fp-regs -ffixed-8 -Wa,-mev6
36 .endif
37
38 #
39 # For IA-64, we use r13 for the kernel globals pointer and we only use
40 # a very small subset of float registers for integer divides.
41 #
42 .if ${MACHINE_ARCH} == "ia64"
43 CFLAGS+= -ffixed-r13 -mfixed-range=f32-f127 -mno-sdata
44 .endif
45
46 #
47 # GCC 3.0 and above like to do certain optimizations based on the
48 # assumption that the program is linked against libc. Stop this.
49 #
50 CFLAGS+= -ffreestanding
Cache object: 365e3e92bd1a32f1e0d173d716333575
|