Merge from vendor branch SENDMAIL:
[dragonfly.git] / sys / conf / 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/sys/conf/bsd.kern.mk,v 1.13 2007/10/03 10:07:48 sephe Exp $
3
4 .if ${CCVER} != gcc34
5 CNOWARNFLAGS=   -Wno-pointer-sign
6 .endif
7
8 #
9 # Warning flags for compiling the kernel and components of the kernel.
10 #
11 # Note that the newly added -Wcast-qual is responsible for generating 
12 # most of the remaining warnings.  Warnings introduced with -Wall will
13 # also pop up, but are easier to fix.
14 #
15 CWARNFLAGS?=    -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
16                 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
17                 ${CNOWARNFLAGS} -ansi
18 #
19 # The following flags are next up for working on:
20 #       -W
21 #
22 # When working on removing warnings from code, the `-Werror' flag should be
23 # of material assistance.
24 #
25
26 CFLAGS+= -finline-limit=${INLINE_LIMIT}
27 CFLAGS+= --param inline-unit-growth=100
28 CFLAGS+= --param large-function-growth=1000
29
30 # Require the proper use of 'extern' for variables.  -fno-common will
31 # cause duplicate declarations to generate a link error.
32 #
33 CFLAGS+=        -fno-common
34
35 # Prevent GCC 3.x from making certain libc based inline optimizations
36 #
37 CFLAGS+=        -ffreestanding
38
39 .include "../platform/${MACHINE_PLATFORM}/conf/kern.mk"