]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/conf/kern.mk
This commit was generated by cvs2svn to compensate for changes in r77298,
[FreeBSD/FreeBSD.git] / sys / conf / kern.mk
1 # $FreeBSD$
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 #
10 CWARNFLAGS?=    -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
11                 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
12                 -fformat-extensions -ansi
13 #
14 # The following flags are next up for working on:
15 #       -W
16 #
17 # When working on removing warnings from code, the `-Werror' flag should be
18 # of material assistance.
19 #
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)
29 #
30 .if ${MACHINE_ARCH} == "i386"
31 CFLAGS+=        -mpreferred-stack-boundary=2
32 .endif
33
34 #
35 # On the alpha, make sure that we don't use floating-point registers and
36 # allow the use of EV56 instructions (only needed for low-level i/o).
37 # Also, reserve register t7 to point at per-cpu global variables.
38 #
39 .if ${MACHINE_ARCH} == "alpha"
40 CFLAGS+=        -mno-fp-regs -ffixed-8 -Wa,-mev56
41 .endif
42
43 #
44 # For IA-64, we use r13 for the kernel globals pointer and we only use
45 # a very small subset of float registers for integer divides.
46 #
47 .if ${MACHINE_ARCH} == "ia64"
48 CFLAGS+=        -ffixed-r13 -mfixed-range=f32-f127
49 .endif