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
This commit is contained in:
Warner Losh 2019-08-23 16:42:04 +00:00
parent 40adef9e59
commit 17c12f64a9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=351429
2 changed files with 10 additions and 1 deletions

View File

@ -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}}

View File

@ -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