nrelease - fix/improve livecd
[dragonfly.git] / sys / conf / bsd.kern.mk
CommitLineData
984263bc
MD
1# $FreeBSD: src/share/mk/bsd.kern.mk,v 1.17.2.1 2001/08/01 16:56:56 obrien Exp $
2
984263bc
MD
3# Warning flags for compiling the kernel and components of the kernel.
4#
a7fe2b82 5# Note that -Werror is on by default. To turn it off, e.g. when working
be203f75
SW
6# on adding new warning options, NO_WERROR in make.conf (or on make(1)'s
7# command line) should be of material assistance.
984263bc 8#
be203f75 9
6a8dae24 10CSTD?= gnu11
75d9e519 11
984263bc 12CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
eb370d8f
SW
13 -Wmissing-prototypes -Wpointer-arith -Wcast-qual \
14 -Wold-style-definition -Wmissing-include-dirs \
75d9e519 15 -Wno-pointer-sign -Winit-self -Wundef
df0fdfc9 16
52cb92ac
JM
17.if ${CCVER:Mgcc*}
18# All flags inside this block are gcc-specific except for --param
19# Since inline-limit wasn't recognized, and since --param squawks on clang
20# when it isn't used, it was shift to GCC compilers only.
21CFLAGS+= -Wold-style-declaration \
22 -finline-limit=${INLINE_LIMIT} \
23 --param inline-unit-growth=100 \
24 --param large-function-growth=1000
bb817e97 25.if ${CCVER:Mgcc4[789]} || ${CCVER:Mgcc[5-]*}
df0fdfc9
SW
26CWARNFLAGS+= -Wno-unused-but-set-variable
27.endif
52cb92ac 28.endif
984263bc 29
2a1b3304 30
a4786b57
MD
31# Require the proper use of 'extern' for variables. -fno-common will
32# cause duplicate declarations to generate a link error.
33#
34CFLAGS+= -fno-common
35
6b08710e
MD
36# Prevent GCC 3.x from making certain libc based inline optimizations
37#
38CFLAGS+= -ffreestanding
edbe133c 39
0955fd91 40.include "../platform/${MACHINE_PLATFORM}/conf/kern.mk"