diff mbox series

[bug#40009,core-updates] : Use per-architecture GCC for libstdc++-boot0

Message ID 20200310111227.GX1423@E5400
State Accepted
Headers show
Series [bug#40009,core-updates] : Use per-architecture GCC for libstdc++-boot0 | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Efraim Flashner March 10, 2020, 11:12 a.m. UTC
I've tested this on aarch64 and there were no problems. It also
provides a nice framework for other architectures as they become
supported.

Comments

Marius Bakke March 10, 2020, 7:21 p.m. UTC | #1
Efraim Flashner <efraim@flashner.co.il> writes:

> I've tested this on aarch64 and there were no problems. It also
> provides a nice framework for other architectures as they become
> supported.

What is the benefit of this patch?  I'd prefer to keep libstdc++-boot0
identical across architectures for simplicity, unless there is a good
reason to do otherwise (say, porting to a new architecture).

Now we could end up in a situation where someone patches GCC5 on
'master' and accidentally triggers a full rebuild on AArch64.
Efraim Flashner March 11, 2020, 6:51 a.m. UTC | #2
On Tue, Mar 10, 2020 at 08:21:08PM +0100, Marius Bakke wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > I've tested this on aarch64 and there were no problems. It also
> > provides a nice framework for other architectures as they become
> > supported.
> 
> What is the benefit of this patch?  I'd prefer to keep libstdc++-boot0
> identical across architectures for simplicity, unless there is a good
> reason to do otherwise (say, porting to a new architecture).
> 
> Now we could end up in a situation where someone patches GCC5 on
> 'master' and accidentally triggers a full rebuild on AArch64.

Sound reasoning. And currently most of the porting work makes use of
GCC7 and not GCC5. I'm closing this bug.
diff mbox series

Patch

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 © 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
@@ -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 refer
-  ;; 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)))