1 # $FreeBSD: src/share/mk/bsd.kern.mk,v 1.17.2.1 2001/08/01 16:56:56 obrien Exp $
2 # $DragonFly: src/share/mk/Attic/bsd.kern.mk,v 1.3 2003/11/14 22:58:30 dillon Exp $
5 # Warning flags for compiling the kernel and components of the kernel.
7 # Note that the newly added -Wcast-qual is responsible for generating
8 # most of the remaining warnings. Warnings introduced with -Wall will
9 # also pop up, but are easier to fix.
11 CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
12 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
13 -fformat-extensions -ffreestanding -ansi
15 # The following flags are next up for working on:
18 # When working on removing warnings from code, the `-Werror' flag should be
19 # of material assistance.
23 # On the i386, do not align the stack to 16-byte boundaries. Otherwise GCC
24 # 2.95 adds code to the entry and exit point of every function to align the
25 # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
26 # per function call. While the 16-byte alignment may benefit micro benchmarks,
27 # it is probably an overall loss as it makes the code bigger (less efficient
28 # use of code cache tag lines) and uses more stack (less efficient use of data
31 .if ${MACHINE_ARCH} == "i386"
32 CFLAGS+= -mpreferred-stack-boundary=2
36 # On the alpha, make sure that we don't use floating-point registers and
37 # allow the use of EV56 instructions (only needed for low-level i/o).
39 .if ${MACHINE_ARCH} == "alpha"
40 CFLAGS+= -mno-fp-regs -Wa,-mev56