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

From: Efraim Flashner <[email-masked]>
Date: Tue, 10 Mar 2020 13:12:27 +0200

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

-- 
Efraim Flashner   <[email-masked]>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
From 4506c48da7df4397d459337988adbdd54c0d440d Mon Sep 17 00:00:00 2001
From: Efraim Flashner <[email-masked]>
Date: Thu, 13 Feb 2020 10:47:34 +0200
Subject: [PATCH 1/2] gnu: libstdc++-boot0: Use per-architecture gcc versions.

* 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 © 2014 Andreas Enge <[email-masked]>
 ;;; Copyright © 2012 Nikita Karetnikov <[email-masked]>
 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <[email-masked]>
-;;; Copyright © 2017, 2018, 2019 Efraim Flashner <[email-masked]>
+;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <[email-masked]>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <[email-masked]>
 ;;; Copyright © 2019 Marius Bakke <[email-masked]>
@@ -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)))
-- 
2.25.0