[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/38: gnu: gcc-boot0: Use libstdc++-boot0-gcc7 on riscv64-linux.
From: |
guix-commits |
Subject: |
02/38: gnu: gcc-boot0: Use libstdc++-boot0-gcc7 on riscv64-linux. |
Date: |
Sun, 10 Oct 2021 09:27:56 -0400 (EDT) |
efraim pushed a commit to branch wip-riscv
in repository guix.
commit 634cdb6ba418a5a81b31aa8aba907c80d1cc9627
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Jul 25 12:58:38 2021 +0000
gnu: gcc-boot0: Use libstdc++-boot0-gcc7 on riscv64-linux.
* gnu/packages/commencement.scm (libstdc++-boot0-gcc7): New variable.
(gcc-boot0)[inputs]: On riscv64-linux use libstdc++-boot0-gcc7 instead
of libstdc++-boot0.
---
gnu/packages/commencement.scm | 48 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index aff2a4a..90b9682 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2702,6 +2702,50 @@ exec " gcc "/bin/" program
(inputs (%boot0-inputs))
(native-inputs '()))))
+(define libstdc++-boot0-gcc7
+ ;; GCC >= 7 is needed by architectures which use C++-14 features.
+ (let ((lib (make-libstdc++ gcc-7)))
+ (package
+ (inherit lib)
+ (source (bootstrap-origin (package-source lib)))
+ (name "libstdc++-boot0")
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:implicit-inputs? #f
+
+ ;; XXX: libstdc++.so NEEDs ld.so for some reason.
+ #:validate-runpath? #f
+
+ ,@(substitute-keyword-arguments (package-arguments lib)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'unpack-gmp&co
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gmp (assoc-ref %build-inputs "gmp-source"))
+ (mpfr (assoc-ref %build-inputs "mpfr-source"))
+ (mpc (assoc-ref %build-inputs "mpc-source")))
+
+ ;; To reduce the set of pre-built bootstrap inputs,
build
+ ;; GMP & co. from GCC.
+ (for-each (lambda (source)
+ (invoke "tar" "xvf" source))
+ (list gmp mpfr mpc))
+
+ ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
+ ,@(map (lambda (lib)
+ ;; Drop trailing letters, as gmp-6.0.0a unpacks
+ ;; into gmp-6.0.0.
+ `(symlink ,(string-trim-right
+ (package-full-name lib "-")
+ char-set:letter)
+ ,(package-name lib)))
+ (list gmp-6.0 mpfr mpc))))))))))
+ (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
+ ("mpfr-source" ,(bootstrap-origin (package-source mpfr)))
+ ("mpc-source" ,(bootstrap-origin (package-source mpc)))
+ ,@(%boot0-inputs)))
+ (native-inputs '()))))
+
(define gcc-boot0
(package
(inherit gcc)
@@ -2813,7 +2857,9 @@ exec " gcc "/bin/" program
("binutils-cross" ,binutils-boot0)
;; The libstdc++ that libcc1 links against.
- ("libstdc++" ,libstdc++-boot0)
+ ("libstdc++" ,(match (%current-system)
+ ("riscv64-linux" libstdc++-boot0-gcc7)
+ (_ libstdc++-boot0)))
;; Call it differently so that the builder can check whether
;; the "libc" input is #f.
- 03/38: gnu: %boot3-inputs: Add missing input., (continued)
- 03/38: gnu: %boot3-inputs: Add missing input., guix-commits, 2021/10/10
- 13/38: gnu: openlibm: Remove riscv64-linux from supported systems., guix-commits, 2021/10/10
- 05/38: gnu: elfutils: Fix building on riscv64-linux., guix-commits, 2021/10/10
- 10/38: gnu: pcre2: Fix building on riscv64-linux., guix-commits, 2021/10/10
- 07/38: gnu: libtool: Fix test suite on riscv64-linux., guix-commits, 2021/10/10
- 06/38: gnu: pcre: Fix building on riscv64-linux., guix-commits, 2021/10/10
- 11/38: gnu: icu4c: Skip tests on riscv64-linux., guix-commits, 2021/10/10
- 14/38: gnu: texlive-bin: Fix building on riscv64-linux., guix-commits, 2021/10/10
- 18/38: gnu: Add libunwind-next., guix-commits, 2021/10/10
- 22/38: gnu: qemu: Skip some tests on riscv64-linux., guix-commits, 2021/10/10
- 02/38: gnu: gcc-boot0: Use libstdc++-boot0-gcc7 on riscv64-linux.,
guix-commits <=
- 04/38: gnu: %final-inputs: Add implied gcc:lib input., guix-commits, 2021/10/10
- 15/38: gnu: lz4: Build on riscv64-linux without valgrind., guix-commits, 2021/10/10
- 21/38: gnu: libfaketime: Adjust flags on riscv64-linux., guix-commits, 2021/10/10
- 08/38: gnu: openblas: Fix building on riscv64-linux., guix-commits, 2021/10/10
- 09/38: gnu: mesa: Add support for riscv64-linux., guix-commits, 2021/10/10
- 16/38: gnu: lapack: Fix building on riscv64-linux., guix-commits, 2021/10/10
- 17/38: gnu: texlive-latex-base: Skip JIT formats on riscv64-linux., guix-commits, 2021/10/10
- 27/38: gnu: make-opensbi-package: Adjust installed files., guix-commits, 2021/10/10
- 32/38: gnu: postgresql: Fix building on riscv64-linux., guix-commits, 2021/10/10
- 24/38: gnu: webrtc-audio-processing: Fix riscv64 detection., guix-commits, 2021/10/10