Compile the kernel and modules with C99 warnings, not C90 (-ansi).
[dragonfly.git] / sys / conf / bsd.kern.mk
CommitLineData
984263bc 1# $FreeBSD: src/share/mk/bsd.kern.mk,v 1.17.2.1 2001/08/01 16:56:56 obrien Exp $
e0f410b1 2# $DragonFly: src/sys/conf/bsd.kern.mk,v 1.15 2008/01/09 00:07:57 corecode Exp $
984263bc
MD
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#
11CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
12 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
e0f410b1 13 -std=c99
984263bc
MD
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
2a1b3304
SS
22CFLAGS+= -finline-limit=${INLINE_LIMIT}
23CFLAGS+= --param inline-unit-growth=100
24CFLAGS+= --param large-function-growth=1000
25
a4786b57
MD
26# Require the proper use of 'extern' for variables. -fno-common will
27# cause duplicate declarations to generate a link error.
28#
29CFLAGS+= -fno-common
30
6b08710e
MD
31# Prevent GCC 3.x from making certain libc based inline optimizations
32#
33CFLAGS+= -ffreestanding
edbe133c 34
0955fd91 35.include "../platform/${MACHINE_PLATFORM}/conf/kern.mk"