tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Building netbsd-10 on -current fails (patch)



Building netbsd-10 on a current host fails with:

...src-10/external/gpl3/gcc/dist/gcc/genmodes.c:1935:14: error: 'swap' is not a member of 'std'
 1935 |         std::swap (mode_sort[i], mode_sort[j]);
      |              ^~~~


The patch below seems to be enough to fix this (and with that the full build
of netbsd-10 works):

Can someone please review and request pullup (I'd suggest of just this
minimal patch).

Martin

--8<-
Cherry-picked from revision 1.69:
date: 2023-08-01 07:57:54 +0200;  author: mrg;  state: Exp;  lines: +111
various updates to build native GCC 12.
[..]
- use -std=gnu++11 for various places


Index: Makefile
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/usr.bin/backend/Makefile,v
retrieving revision 1.66.2.2
diff -u -p -r1.66.2.2 Makefile
--- Makefile	8 Oct 2023 14:35:19 -0000	1.66.2.2
+++ Makefile	23 Nov 2026 13:18:47 -0000
@@ -30,7 +30,7 @@ CPPFLAGS.cppdefault.c+=	-DPREFIX=\"/usr\
 			-DNATIVE_SYSTEM_HEADER_DIR=\"${G_NATIVE_SYSTEM_HEADER_DIR}\"
 CPPFLAGS.lto-streamer-in.c+=	-DTARGET_MACHINE=\"${MACHINE_GNU_PLATFORM}\"
 
-HOST_CXXFLAGS+=	-std=gnu++98
+HOST_CXXFLAGS+=	-std=gnu++11
 
 HOST_LIBIBERTYOBJ!=	cd ${.CURDIR}/../host-libiberty && ${PRINTOBJDIR}
 


Home | Main Index | Thread Index | Old Index