GNU bug report logs -
#74290
[PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.
Previous Next
Reported by: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Date: Sun, 10 Nov 2024 10:35:02 UTC
Severity: normal
Tags: patch
Done: Janneke Nieuwenhuizen <janneke <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* 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 <at> 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
This bug report was last modified 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.