<sys/proc.h>: Fix unused macro name (number == bit number) and comment.
[dragonfly.git] / sys / conf / bsd.kern.mk
blob4d16d327c9bec509f0cfd3a8c44a59b3091c212b
1 # $FreeBSD: src/share/mk/bsd.kern.mk,v 1.17.2.1 2001/08/01 16:56:56 obrien Exp $
3 # Warning flags for compiling the kernel and components of the kernel.
5 # Note that -Werror is on by default. To turn it off, e.g. when working
6 # on adding new warning options, NO_WERROR in make.conf (or on make(1)'s
7 # command line) should be of material assistance.
10 CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
11 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
12 -Wold-style-definition -Wmissing-include-dirs -Wno-inline \
13 -Wno-pointer-sign -Winit-self -std=c99
15 .if ${CCVER:Mgcc*}
16 # All flags inside this block are gcc-specific except for --param
17 # Since inline-limit wasn't recognized, and since --param squawks on clang
18 # when it isn't used, it was shift to GCC compilers only.
19 CFLAGS+= -Wold-style-declaration \
20 -finline-limit=${INLINE_LIMIT} \
21 --param inline-unit-growth=100 \
22 --param large-function-growth=1000
23 .if ${CCVER:Mgcc4[789]} || ${CCVER:Mgcc[5-]*}
24 CWARNFLAGS+= -Wno-unused-but-set-variable
25 .endif
26 # XXX drm/i915 is too noisy for gcc80, keep till i915 update
27 .if ${CCVER:Mgcc80}
28 CWARNFLAGS+= -Wno-error=unused-const-variable
29 .endif
30 .endif
33 # Require the proper use of 'extern' for variables. -fno-common will
34 # cause duplicate declarations to generate a link error.
36 CFLAGS+= -fno-common
38 # Prevent GCC 3.x from making certain libc based inline optimizations
40 CFLAGS+= -ffreestanding
42 .include "../platform/${MACHINE_PLATFORM}/conf/kern.mk"