gcc50: Exclude -Wunused-local-typedefs from C++ flags for now.
authorSascha Wildner <saw@online.de>
Wed, 25 Feb 2015 03:55:09 +0000 (04:55 +0100)
committerSascha Wildner <saw@online.de>
Wed, 25 Feb 2015 03:56:47 +0000 (04:56 +0100)
At least GCC 5.0 is warning on its own C++ includes (stl_algo.h,
via <algorithm>) if -Wextra is set, breaking the build of programs
which do nothing wrong themselves (such as devd(8)).

When this gets fixed, we can revert this commit again.

Note that I didn't check with GCC 4.8 or 4.9.

share/mk/sys.mk

index 3996879..6f3a513 100644 (file)
@@ -60,6 +60,12 @@ CXX_LINK     ?=      ${CXX}
 NXCXX          ?=      ${NXENV} ${CXX}
 NXCXX_LINK     ?=      ${NXENV} ${CXX_LINK}
 CXXFLAGS       ?=      ${CXXINCLUDES} ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign:N-Wold-style-definition}
+# XXX gcc50 (at least) warns about its own C++ headers with
+#     -Wunused-local-typedefs, so disable until fixed
+#
+.if (${CCVER:Mgcc4[89]} || ${CCVER:Mgcc5*})
+CXXFLAGS       +=      -Wno-unused-local-typedefs
+.endif
 .if !defined(SYSBUILD) && defined(.MAKE.BUILT.BY) && ${.MAKE.BUILT.BY:Mgcc47}
 CXXFLAGS       +=      -D_GLIBCXX_USE_CXX11_ABI=0
 .endif