Turn off -Werror for gcc 4.2.1 for userland

As discussed on arch@, gcc 4.2.1 is on its way out. Turn off Werror on gcc
versions < 5.0 permantly. This will allow older platforms to continue to compile
w/o new errors once we take them out of universe by default. This will also free
developers from chasing down obsolete warnings that produce no beneficial
changes to the source.

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:39 +00:00
parent 17c12f64a9
commit 7574e8572d

View File

@ -29,6 +29,15 @@ CFLAGS+= -std=${CSTD}
CXXFLAGS+= -std=${CXXSTD}
.endif
#
# Turn off -Werror for gcc 4.2.1. The compiler is on the glide path out of the
# system, and any warnings specific to it are no longer relevant as there are
# too many false positives.
#
.if ${COMPILER_VERSION} < 50000
NO_WERROR.gcc= yes
.endif
# -pedantic is problematic because it also imposes namespace restrictions
#CFLAGS+= -pedantic
.if defined(WARNS)