Create new dialect knob, as setting the language dialect isn't a warning flag.

This commit is contained in:
David E. O'Brien 2006-06-29 21:15:25 +00:00
parent 559adb10ad
commit 1de763bd77
2 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,7 @@ CWARNFLAGS=
.else
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
${_wundef} -fformat-extensions -std=c99
${_wundef} -fformat-extensions
.if !defined(NO_UNDEF)
_wundef= -Wundef
.endif

View File

@ -43,6 +43,7 @@ COPTFLAGS+= ${_CPUCFLAGS}
.if ${CC} == "icc"
NOSTDINC= -X
.else
C_DIALECT= -std=c99
NOSTDINC= -nostdinc
.endif
@ -80,7 +81,7 @@ INCLUDES+= -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/x
.endif
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG}
CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS}
CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
.if ${CC} != "icc"
CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}