aboutsummaryrefslogtreecommitdiff
path: root/sys/conf/kern.mk
diff options
context:
space:
mode:
authorEric van Gyzen <vangyzen@FreeBSD.org>2020-05-12 15:22:40 +0000
committerEric van Gyzen <vangyzen@FreeBSD.org>2020-05-12 15:22:40 +0000
commitfac6dee9eb58b2b558fec2aea749460ca623f6d6 (patch)
tree081b765a37a7fe37a3e96564860bafdaad4d3dc2 /sys/conf/kern.mk
parentd7452d89ad48587b91d20ed6a9480f832c491502 (diff)
downloadsrc-fac6dee9eb58b2b558fec2aea749460ca623f6d6.tar.gz
src-fac6dee9eb58b2b558fec2aea749460ca623f6d6.zip
Remove tests for obsolete compilers in the build system
Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers. Reviewed by: imp (earlier version), emaste, jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24802
Notes
Notes: svn path=/head/; revision=360964
Diffstat (limited to 'sys/conf/kern.mk')
-rw-r--r--sys/conf/kern.mk36
1 files changed, 8 insertions, 28 deletions
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 23c98de879b7..71abc84247ec 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -31,19 +31,14 @@ NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare
CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \
-Wno-error-parentheses-equality -Wno-error-unused-function \
-Wno-error-pointer-sign
-.if ${COMPILER_VERSION} >= 30700
CWARNEXTRA+= -Wno-error-shift-negative-value
-.endif
-.if ${COMPILER_VERSION} >= 40000
CWARNEXTRA+= -Wno-address-of-packed-member
-.endif
.if ${COMPILER_VERSION} >= 100000
NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation
.endif
-.endif
+.endif # clang
.if ${COMPILER_TYPE} == "gcc"
-.if ${COMPILER_VERSION} >= 40800
# Catch-all for all the things that are in our tree, but for which we're
# not yet ready for this compiler.
NO_WUNUSED_BUT_SET_VARIABLE = -Wno-unused-but-set-variable
@@ -55,15 +50,13 @@ CWARNEXTRA?= -Wno-error=address \
-Wno-error=enum-compare \
-Wno-error=inline \
-Wno-error=maybe-uninitialized \
+ -Wno-error=misleading-indentation \
+ -Wno-error=nonnull-compare \
-Wno-error=overflow \
-Wno-error=sequence-point \
- -Wno-unused-but-set-variable
-.if ${COMPILER_VERSION} >= 60100
-CWARNEXTRA+= -Wno-error=misleading-indentation \
- -Wno-error=nonnull-compare \
-Wno-error=shift-overflow \
- -Wno-error=tautological-compare
-.endif
+ -Wno-error=tautological-compare \
+ -Wno-unused-but-set-variable
.if ${COMPILER_VERSION} >= 70100
CWARNEXTRA+= -Wno-error=stringop-overflow
.endif
@@ -76,15 +69,7 @@ CWARNEXTRA+= -Wno-error=packed-not-aligned
.if ${COMPILER_VERSION} >= 90100
CWARNEXTRA+= -Wno-address-of-packed-member
.endif
-.else
-# For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars.
-CWARNEXTRA?= -Wno-uninitialized
-# GCC 4.2 doesn't have -Wno-error=cast-qual, so just disable the warning for
-# the few files that are already known to generate cast-qual warnings.
-NO_WCAST_QUAL= -Wno-cast-qual
-NO_WNONNULL= -Wno-nonnull
-.endif
-.endif
+.endif # gcc
# This warning is utter nonsense
CWARNFLAGS+= -Wno-format-zero-length
@@ -93,7 +78,7 @@ CWARNFLAGS+= -Wno-format-zero-length
# to be disabled. WARNING: format checking is disabled in this case.
.if ${MK_FORMAT_EXTENSIONS} == "no"
FORMAT_EXTENSIONS= -Wno-format
-.elif ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600
+.elif ${COMPILER_TYPE} == "clang"
FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__
.else
FORMAT_EXTENSIONS= -fformat-extensions
@@ -201,12 +186,7 @@ CFLAGS.gcc+= -mno-spe
# DDB happy. ELFv2, if available, has some other efficiency benefits.
#
.if ${MACHINE_ARCH} == "powerpc64"
-.if ${COMPILER_VERSION} >= 40900
-CFLAGS.gcc+= -mabi=elfv2
-.else
-CFLAGS.gcc+= -mcall-aixdesc
-.endif
-CFLAGS.clang+= -mabi=elfv2
+CFLAGS+= -mabi=elfv2
.endif
#