Article View: muc.lists.netbsd.tech.toolchain
Article #9Building netbsd-10 on -current fails (patch)
From: Martin Husemann
Date: Mon, 23 Nov 2026 13:29
Date: Mon, 23 Nov 2026 13:29
43 lines
2341 bytes
2341 bytes
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}
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<awQ_nBt70E-Vze4E@big-apple.aprisoft.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!sewer!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!sewer!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Martin Husemann <martin@duskware.de> Newsgroups: muc.lists.netbsd.tech.toolchain Subject: Building netbsd-10 on -current fails (patch) Date: Mon, 23 Nov 2026 14:29:00 +0100 Organization: Newsgate at muc.de e.V. Sender: tech-toolchain-owner@NetBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <awQ_nBt70E-Vze4E@big-apple.aprisoft.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="71152"; mail-complaints-to="news-admin@muc.de" Content-Disposition: inline Precedence: bulk X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes