From 7a2eb19dbf37cabd5f7cbc4ce999f19e83a35031 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Wed, 20 Feb 2002 23:35:56 +0000 Subject: Commit some infrastructure for turning on -Werror for kernel compiles. It doesn't actually do it yet though. This adds a flag to config so that we can exclude certain vendor files from this even when the rest of the kernel has it on. make -DNO_WERROR would also bypass all of it. --- sys/conf/kern.pre.mk | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sys/conf/kern.pre.mk') diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 27534185edaa..261025f0285d 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -58,14 +58,20 @@ PROF+= -mprofiler-epilogue .endif .endif +#.if defined(NO_WERROR) +#WERROR= +#.else +#WERROR?= -Werror +#.endif + # Put configuration-specific C flags last (except for ${PROF}) so that they # can override the others. CFLAGS+= ${CONF_CFLAGS} -NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} -NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} -NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${.IMPSRC} -PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC} +NORMAL_C= ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} +NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +PROFILE_C= ${CC} -c ${CFLAGS} ${WERROR} ${.IMPSRC} +NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} NORMAL_M= perl5 $S/kern/makeobjops.pl -c $<; \ ${CC} -c ${CFLAGS} ${PROF} ${.PREFIX}.c -- cgit v1.2.3