svn commit: r323164 - in stable/11: share/mk sys/conf
Ryan Libby
rlibby at FreeBSD.org
Mon Sep 4 21:58:36 UTC 2017
Author: rlibby
Date: Mon Sep 4 21:58:35 2017
New Revision: 323164
URL: https://svnweb.freebsd.org/changeset/base/323164
Log:
MFC r303188,r303190,r303271,r303438,r303453: Warn flags for gcc 6.1
r303188 (by br):
Add warn flags for GCC 6.1 compiler.
r303190 (by br):
Add GCC 6.1 warn flags for kernel as well.
r303271 (by br):
Fix style.
r303438 (by br):
o Add warn flags required to build modules with GCC 6.1;
o Sort GCC 4.8 warn flags.
r303453 (by br):
Normalise the CWARNFLAGS inter-word spacing: remove all leading and
trailing space, and convert multiple consecutive spaces to single
space.
Approved by: markj (mentor)
Modified:
stable/11/share/mk/bsd.sys.mk
stable/11/sys/conf/kern.mk
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/share/mk/bsd.sys.mk
==============================================================================
--- stable/11/share/mk/bsd.sys.mk Mon Sep 4 21:17:50 2017 (r323163)
+++ stable/11/share/mk/bsd.sys.mk Mon Sep 4 21:58:35 2017 (r323164)
@@ -114,9 +114,32 @@ CWARNFLAGS+= -Wno-format
# GCC 5.2.0
.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 50200
-CWARNFLAGS+= -Wno-error=unused-function -Wno-error=enum-compare -Wno-error=logical-not-parentheses -Wno-error=bool-compare -Wno-error=uninitialized -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=cast-align -Wno-error=extra -Wno-error=attributes -Wno-error=inline -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=strict-aliasing -Wno-error=address
+CWARNFLAGS+= -Wno-error=address \
+ -Wno-error=array-bounds \
+ -Wno-error=attributes \
+ -Wno-error=bool-compare \
+ -Wno-error=cast-align \
+ -Wno-error=clobbered \
+ -Wno-error=enum-compare \
+ -Wno-error=extra \
+ -Wno-error=inline \
+ -Wno-error=logical-not-parentheses \
+ -Wno-error=strict-aliasing \
+ -Wno-error=uninitialized \
+ -Wno-error=unused-but-set-variable \
+ -Wno-error=unused-function \
+ -Wno-error=unused-value
.endif
+# GCC 6.1.0
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100
+CWARNFLAGS+= -Wno-error=misleading-indentation \
+ -Wno-error=nonnull-compare \
+ -Wno-error=shift-negative-value \
+ -Wno-error=tautological-compare \
+ -Wno-error=unused-const-variable
+.endif
+
# How to handle FreeBSD custom printf format specifiers.
.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 30600
FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__
@@ -170,7 +193,7 @@ CFLAGS+= ${SSP_CFLAGS}
# Allow user-specified additional warning flags, plus compiler and file
# specific flag overrides, unless we've overriden this...
.if ${MK_WARNS} != "no"
-CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${COMPILER_TYPE}}
+CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}}
CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}}
.endif
Modified: stable/11/sys/conf/kern.mk
==============================================================================
--- stable/11/sys/conf/kern.mk Mon Sep 4 21:17:50 2017 (r323163)
+++ stable/11/sys/conf/kern.mk Mon Sep 4 21:58:35 2017 (r323164)
@@ -48,11 +48,24 @@ CLANG_NO_IAS34= -no-integrated-as
.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.
-CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \
- -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \
- -Wno-error=array-bounds -Wno-error=address \
- -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes \
- -Wno-error=strict-overflow -Wno-error=overflow
+CWARNEXTRA?= -Wno-error=address \
+ -Wno-error=aggressive-loop-optimizations \
+ -Wno-error=array-bounds \
+ -Wno-error=attributes \
+ -Wno-error=cast-qual \
+ -Wno-error=enum-compare \
+ -Wno-error=inline \
+ -Wno-error=maybe-uninitialized \
+ -Wno-error=overflow \
+ -Wno-error=sequence-point \
+ -Wno-error=strict-overflow \
+ -Wno-error=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
.else
# For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars.
CWARNEXTRA?= -Wno-uninitialized
@@ -202,7 +215,7 @@ CFLAGS+= -fstack-protector
CFLAGS+= -gdwarf-2
.endif
-CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}}
+CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${.IMPSRC:T}}
CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}}
# Tell bmake not to mistake standard targets for things to be searched for
More information about the svn-src-stable
mailing list