[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#74290] [PATCH v4 55/58] gnu: bootstrap: %bootstrap-gcc: Also wrap g
From: |
Janneke Nieuwenhuizen |
Subject: |
[bug#74290] [PATCH v4 55/58] gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd. |
Date: |
Sun, 24 Nov 2024 08:55:18 +0100 |
* gnu/packages/bootstrap.scm (%bootstrap-gcc)[arguments] When building for
thee 64bit Hurd have the #:builder also wrap g++.
Co-authored-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I2cdbc6837e1c451f108b309f2608240a7f57b82c
---
gnu/packages/bootstrap.scm | 35 +++++++++++++++++++++--------------
1 file changed, 21 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index a6cdda2122..48c7b42cc9 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -866,29 +866,36 @@ (define %bootstrap-gcc
(tarball (assoc-ref %build-inputs "tarball")))
(mkdir out)
- (copy-file tarball "binaries.tar.xz")
+ (copy-file tarball "binaries.tar.xz") ;avoid: more than one hard
link
(invoke xz "-d" "binaries.tar.xz")
(let ((builddir (getcwd))
(bindir (string-append out "/bin")))
+
+ (define (wrap-program program)
+ (let ((wrapped (format #f ".~a-wrapped" program)))
+ (rename-file program wrapped)
+ (call-with-output-file program
+ (lambda (p)
+ (format p "#!~a
+exec ~a/bin/~a -B~a/lib \
+ -Wl,-rpath -Wl,~a/lib \
+ -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
+ bash
+ out wrapped
+ libc libc libc
+ ,(glibc-dynamic-linker)))))
+ (chmod program #o555))
+
(with-directory-excursion out
(invoke tar "xvf"
(string-append builddir "/binaries.tar")))
(with-directory-excursion bindir
(chmod "." #o755)
- (rename-file "gcc" ".gcc-wrapped")
- (call-with-output-file "gcc"
- (lambda (p)
- (format p "#!~a
-exec ~a/bin/.gcc-wrapped -B~a/lib \
- -Wl,-rpath -Wl,~a/lib \
- -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
- bash
- out libc libc libc
- ,(glibc-dynamic-linker))))
-
- (chmod "gcc" #o555)
- #t))))))
+ (for-each wrap-program
+ ,(if (target-hurd64?)
+ ''("gcc" "g++")
+ ''("gcc")))))))))
(inputs
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
("xz" ,(bootstrap-executable "xz" (%current-system)))
--
2.46.0
- [bug#74290] [PATCH v4 41/58] gnu: guile-fibers: Fix build for the 64bit Hurd., (continued)
- [bug#74290] [PATCH v4 41/58] gnu: guile-fibers: Fix build for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 25/58] gnu: gcc-14: Force libdir /lib instead of /lib64 for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 40/58] gnu: grub: Fix build for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 44/58] gnu: commencement: mig-boot0: Update to 1.8+git20231217.., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 50/58] system: examples: Add bare-hurd64.tmpl., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 51/58] system: examples: Add devel-hurd64.tmpl., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 53/58] gnu: commencement: kernel-headers-boot0: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 42/58] gnu: m4: Fix build for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 39/58] gnu: inetutils: Fix build for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 21/58] gnu: libedit: Fix [cross-]build with gcc-14 for 32bit., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 55/58] gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd.,
Janneke Nieuwenhuizen <=
- [bug#74290] [PATCH v4 38/58] gnu: hurd: Build fixes for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 45/58] gnu: commencement: hurd-headers-boot0: Update to 0.9.git20240714., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 47/58] gnu: gettext: Fix cross-build shebangs., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 48/58] gnu: Add gdb-15.2, with support for the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 37/58] gnu: rumpkernel: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 58/58] gnu: commencement: gcc-final: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 52/58] gnu: Use gcc-14, gcc-toolchain-14 on the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 57/58] gnu: commencement: gcc-boot0: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24
- [bug#74290] [PATCH v4 56/58] gnu: commencement: libstdc++-boot0: Support the 64bit Hurd., Janneke Nieuwenhuizen, 2024/11/24