From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: 23/33: gnu: commencement: gcc-boot0: Build fix for the Hurd. Date: Tue, 10 Mar 2020 11:18:10 +0200 Message-ID: <20200310091810.GT1423@E5400> References: <20200310075832.7126.86402@vcs0.savannah.gnu.org> <20200310075850.035F02125B@vcs0.savannah.gnu.org> <87imjcwp1a.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="S5Rg6oz6PtEXgjQf" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36327) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBb2B-0000tt-Rm for guix-devel@gnu.org; Tue, 10 Mar 2020 05:18:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBb2A-0004S6-En for guix-devel@gnu.org; Tue, 10 Mar 2020 05:18:43 -0400 Content-Disposition: inline In-Reply-To: <87imjcwp1a.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --S5Rg6oz6PtEXgjQf Content-Type: multipart/mixed; boundary="BcZrms9gUsdgyR6a" Content-Disposition: inline --BcZrms9gUsdgyR6a Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 10, 2020 at 10:13:37AM +0100, Ludovic Court=C3=A8s wrote: > guix-commits@gnu.org skribis: >=20 > > commit 7a57ca758c590742b63100944f07fddb7290f797 > > Author: Jan Nieuwenhuizen > > AuthorDate: Sun Mar 1 13:45:42 2020 +0100 > > > > gnu: commencement: gcc-boot0: Build fix for the Hurd. > > =20 > > Fixes: > > g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-excep= tions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrit= e-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -peda= ntic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_C= ONFIG_H -DGENERATOR_FILE -fno-PIE -static-libstdc++ -static-libgcc -Wl,-rpa= th=3D/gnu/store/vp2id82a597p119b3wyhhkhd467wvn78-glibc-bootstrap-0/lib -Wl,= -dynamic-linker -Wl,/gnu/store/vp2id82a597p119b3w [...] > > build/genmddeps.o build/read-md.o build/errors.o ../build-i= 586-unknown-gnu/libiberty/libiberty.a > > /gnu/store/jk3kx5jwjs9m60svzk6sz79bf0w33l91-binutils-cross-boot= 0-2.34/bin/ld: build/read-md.o: in function `md_reader::~md_reader()': > > /tmp/guix-build-gcc-cross-boot0-7.5.0.drv-0/build/gcc/../../gcc= -7.5.0/gcc/read-md.c:1049: undefined reference to `operator delete(void*, u= nsigned int)' > > =20 > > This raises the question: Should libstdc++-boot0 (v4.9) be sufficie= nt to build > > gcc-boot0 (v7.5.0)? >=20 > Hmm? :-) >=20 > > * gnu/packages/commencement.scm (gcc-boot0): Add static library pat= h. >=20 > > `(,(string-append "LDFLAGS=3D" > > + (if ,(hurd-system?) > > + (string-append > > + "-L" (assoc-ref %build-inputs "g= cc") "/lib ") > > + "") >=20 > Could you add a comment saying that this is to allow the =E2=80=98delete= =E2=80=99 > operator to be found? Weird. >=20 > That=E2=80=99s it, thanks for the great work! >=20 > Ludo=E2=80=99. >=20 With the bootstrapping efforts going around there's a couple of patches floating around to change the gcc version for libstdc++-boot0. I've tested the following patch, which also prepares the way for any other future supported platforms. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --BcZrms9gUsdgyR6a Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-libstdc-boot0-Use-per-architecture-gcc-versions.patch" Content-Transfer-Encoding: quoted-printable =46rom 4506c48da7df4397d459337988adbdd54c0d440d Mon Sep 17 00:00:00 2001 =46rom: Efraim Flashner Date: Thu, 13 Feb 2020 10:47:34 +0200 Subject: [PATCH 1/2] gnu: libstdc++-boot0: Use per-architecture gcc version= s. * gnu/packages/commencement.scm (libstdc++-boot0): Use a version of gcc more closely tied to their bootstrap process. --- gnu/packages/commencement.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 2a0a83ad49..b5cb08a19a 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3,7 +3,7 @@ ;;; Copyright =C2=A9 2014 Andreas Enge ;;; Copyright =C2=A9 2012 Nikita Karetnikov ;;; Copyright =C2=A9 2014, 2015, 2017 Mark H Weaver -;;; Copyright =C2=A9 2017, 2018, 2019 Efraim Flashner +;;; Copyright =C2=A9 2017, 2018, 2019, 2020 Efraim Flashner ;;; Copyright =C2=A9 2018 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018 Jan (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2019 Marius Bakke @@ -1427,9 +1427,12 @@ exec " gcc "/bin/" program (define libstdc++-boot0 ;; GCC's libcc1 is always built as a shared library (the top-level ;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to ref= er - ;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on - ;; C++14 features missing in some of our bootstrap compilers. - (let ((lib (make-libstdc++ gcc-4.9))) + ;; to libstdc++.so. We therefore use a version of GCC which most closely + ;; matches the bootstrap compiler of that architecture. + (let ((lib (make-libstdc++ + (match (%current-system) + ("aarch64-linux" gcc-5) + (_ gcc-4.9))))) (package (inherit lib) (source (bootstrap-origin (package-source lib))) --=20 2.25.0 --BcZrms9gUsdgyR6a-- --S5Rg6oz6PtEXgjQf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl5nW04ACgkQQarn3Mo9 g1E0cBAAkM3tV7etzjSn7GfGAAfWJQs1xoxmzLUgupeMpZWnxzqsbChih3wwQZWl t2JLTFR10tQdvC2NmPnWxIF6Bhfmi6pkVTwW7hjCdwiON+L+KccWGzhpgO3Kj+Aa auG2FYBMwY1Bzkx7A1hxARDMKUe/FHxsGouPsJzEBDB+goA3Vyz2oU0jGHPb3fIi YPWEWlLEz6TesUdXdvs+RAOrniBmw2VwNrVlcC4defnMsGM53BJ1fcB5ovoheE2U F9ECzFlUOfYPP8dproIvhraPGrugb220MjZ9+5MRnPqc++x+2M3AwJaisCrwXUkt +IYvG/yh1sxqlt3AQkxR9GcElJMM6zARP2PM2hX+3rrTrU4DZvrIUMRV/JewQsJl q9jAcjMPvW364vpF9n9Y1yqw2O0r/0fT+D9iaDwYuK6rsWfCF73X9d9EjNemzYDt rmadYYENZYCS+IrDHVUt9RwePId8IUGD9NLinZvHtJ3fqBVpyn6pevfwb/Qgw5Sy jRzdpKZganCT8s/DJs/+Mhk6oW88IyXlt8NowUvXLAq96uFDFfduVFPxUly2slKU mzXrZ9MLjSLe8MXRKZ2/MUxGCA46eL3LHrVJgHyqkSco/deSFgjkcisoV6EcG5Rz 1i2oqGMtCopp3l8Vy3AKl+NbimF+UkhyTiiTNwUip9C6Jv/bAck= =T9vj -----END PGP SIGNATURE----- --S5Rg6oz6PtEXgjQf--