svn commit: r351429 - head/sys/conf

Warner Losh imp at FreeBSD.org
Fri Aug 23 16:42:05 UTC 2019


Author: imp
Date: Fri Aug 23 16:42:04 2019
New Revision: 351429
URL: https://svnweb.freebsd.org/changeset/base/351429

Log:
  Turn off -Werror for gcc 4.2.1
  
  As part of marching gcc 4.2.1 out of the tree, turn off -Werror on gcc 4.2.1
  compiles by default. It generates too many false positives and breaks CI
  for no benefit.
  
  Discussed on: arch@
  Reviewed by: jhb@, emaste@, pfg@
  Differential Revision: https://reviews.freebsd.org/D21378

Modified:
  head/sys/conf/kern.pre.mk
  head/sys/conf/kmod.mk

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Fri Aug 23 16:26:06 2019	(r351428)
+++ head/sys/conf/kern.pre.mk	Fri Aug 23 16:42:04 2019	(r351429)
@@ -93,7 +93,11 @@ CFLAGS.gcc+= -fms-extensions
 .if defined(CFLAGS_ARCH_PARAMS)
 CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS}
 .endif
-WERROR?= -Werror
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000
+WERROR?=	-Wno-error
+.else
+WERROR?=	-Werror
+.endif
 
 # XXX LOCORE means "don't declare C stuff" not "for locore.s".
 ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC:T}} 

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Fri Aug 23 16:26:06 2019	(r351428)
+++ head/sys/conf/kmod.mk	Fri Aug 23 16:42:04 2019	(r351429)
@@ -107,7 +107,12 @@ __KLD_SHARED=no
 .if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing)
 CFLAGS+=	-fno-strict-aliasing
 .endif
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} < 50000
+WERROR?=	-Wno-error
+.else
 WERROR?=	-Werror
+.endif
+
 CFLAGS+=	${WERROR}
 CFLAGS+=	-D_KERNEL
 CFLAGS+=	-DKLD_MODULE


More information about the svn-src-head mailing list