attach rc.subr to the build
[dragonfly.git] / share / mk / bsd.kern.mk
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.2 2003/06/17 04:37:02 dillon Exp $
3
4 #
5 # Warning flags for compiling the kernel and components of the kernel.
6 #
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.
10 #
11 CWARNFLAGS?=    -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
12                 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
13                 -fformat-extensions -ansi
14 #
15 # The following flags are next up for working on:
16 #       -W
17 #
18 # When working on removing warnings from code, the `-Werror' flag should be
19 # of material assistance.
20 #
21
22 #
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
29 # cache tag lines)
30 #
31 .if ${MACHINE_ARCH} == "i386"
32 CFLAGS+=        -mpreferred-stack-boundary=2
33 .endif
34
35 #
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).
38 #
39 .if ${MACHINE_ARCH} == "alpha"
40 CFLAGS+=        -mno-fp-regs -Wa,-mev56
41 .endif