diff options
author | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-11-19 20:20:50 +0100 |
---|---|---|
committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-12-03 08:39:01 +0100 |
commit | 877b925df16740f9419d165d39cb7f191a86d5d1 (patch) | |
tree | 3ce5d88cbb99e1046a9f3a9180a772c0b433b74f /gnu/packages/bootstrap.scm | |
parent | 12416994273f1fcacba50bfc145311b4a850def6 (diff) | |
download | guix-877b925df16740f9419d165d39cb7f191a86d5d1.tar.gz guix-877b925df16740f9419d165d39cb7f191a86d5d1.zip |
gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd.
* 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
Diffstat (limited to 'gnu/packages/bootstrap.scm')
-rw-r--r-- | gnu/packages/bootstrap.scm | 35 |
1 files 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 @@ $out/bin/guile --version~%" (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))) |