1# $FreeBSD: src/share/mk/bsd.kern.mk,v 1.17.2.1 2001/08/01 16:56:56 obrien Exp $ 2 3# Warning flags for compiling the kernel and components of the kernel. 4# 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. 8# 9 10CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ 11 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ 12 -Wold-style-definition -std=c99 13 14.if ${CCVER} != "gcc41" 15CWARNFLAGS+= -Wold-style-declaration 16.endif 17 18CFLAGS+= -finline-limit=${INLINE_LIMIT} 19CFLAGS+= --param inline-unit-growth=100 20CFLAGS+= --param large-function-growth=1000 21 22# Require the proper use of 'extern' for variables. -fno-common will 23# cause duplicate declarations to generate a link error. 24# 25CFLAGS+= -fno-common 26 27# Prevent GCC 3.x from making certain libc based inline optimizations 28# 29CFLAGS+= -ffreestanding 30 31.include "../platform/${MACHINE_PLATFORM}/conf/kern.mk" 32