Module Name: src Committed By: gutteridge Date: Sun Jun 16 16:03:30 UTC 2024
Modified Files: src/tools/gcc: Makefile Log Message: tools/gcc/Makefile: force std=c++11 for GCC 12 builds GCC >= 11 now requires C++11 to build. Impacted individual components vary whether they test for if std=c++11 is the default or has to be passed. Regardless, our build infrastructure applies its own overrides. Force this setting so that we can still build on NetBSD 8.x hosts (and probably 7.x, too). Build tested on NetBSD 8.3. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.113 src/tools/gcc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tools/gcc/Makefile diff -u src/tools/gcc/Makefile:1.112 src/tools/gcc/Makefile:1.113 --- src/tools/gcc/Makefile:1.112 Sat Jun 8 01:07:44 2024 +++ src/tools/gcc/Makefile Sun Jun 16 16:03:30 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.112 2024/06/08 01:07:44 gutteridge Exp $ +# $NetBSD: Makefile,v 1.113 2024/06/16 16:03:30 gutteridge Exp $ .include <bsd.hostinit.mk> @@ -16,6 +16,12 @@ MKNATIVE= ${.CURDIR}/mknative-gcc.old CC_FOR_BUILD= ${HOST_CXX:Q} MKNATIVE?= ${.CURDIR}/mknative-gcc +# Force C++11 so builds succeed on hosts where this isn't the compiler +# default, e.g., NetBSD 8.x with GCC 5.5. +.if ${HAVE_GCC} > 10 +HOST_CXXFLAGS+= -std=c++11 +.endif + .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" MULTILIB_ARGS= --enable-multilib .else