mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-07 19:39:34 +01:00
Revert "Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd.""
This cleanup was reverted because it led to a world rebuild.
This reverts commit 006679d1e6
.
Change-Id: Id14fcc35fb8d550644b4d6cebace110ae0bab59e
This commit is contained in:
parent
bde32a3d88
commit
b745f4fd20
1 changed files with 23 additions and 36 deletions
|
@ -774,14 +774,14 @@ $out/bin/guile --version~%"
|
||||||
(chmod "lib" #o755)
|
(chmod "lib" #o755)
|
||||||
|
|
||||||
;; Patch linker scripts so they refer to the right file-names.
|
;; Patch linker scripts so they refer to the right file-names.
|
||||||
,@(if (target-hurd64?)
|
,(if (target-hurd64?)
|
||||||
'((substitute* '("lib/libc.so" "lib/libm.so")
|
'(substitute* '("lib/libc.so" "lib/libm.so")
|
||||||
(("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
|
(("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
|
||||||
(string-append out "/lib/" prefix))))
|
(string-append out "/lib/" prefix)))
|
||||||
'((substitute* "lib/libc.so"
|
'(substitute* "lib/libc.so"
|
||||||
(("/[^ ]+/lib/(libc|ld)" _ prefix)
|
(("/[^ ]+/lib/(libc|ld)" _ prefix)
|
||||||
(string-append out "/lib/" prefix)))
|
(string-append out "/lib/" prefix))))
|
||||||
#t))))))))
|
#t))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
||||||
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
||||||
|
@ -873,22 +873,20 @@ $out/bin/guile --version~%"
|
||||||
(let ((builddir (getcwd))
|
(let ((builddir (getcwd))
|
||||||
(bindir (string-append out "/bin")))
|
(bindir (string-append out "/bin")))
|
||||||
|
|
||||||
,@(if (target-hurd64?)
|
(define (wrap-program program)
|
||||||
`((define (wrap-program program)
|
(let ((wrapped (format #f ".~a-wrapped" program)))
|
||||||
(let ((wrapped (format #f ".~a-wrapped" program)))
|
(rename-file program wrapped)
|
||||||
(rename-file program wrapped)
|
(call-with-output-file program
|
||||||
(call-with-output-file program
|
(lambda (p)
|
||||||
(lambda (p)
|
(format p "#!~a
|
||||||
(format p "#!~a
|
|
||||||
exec ~a/bin/~a -B~a/lib \
|
exec ~a/bin/~a -B~a/lib \
|
||||||
-Wl,-rpath -Wl,~a/lib \
|
-Wl,-rpath -Wl,~a/lib \
|
||||||
-Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
-Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
bash
|
bash
|
||||||
out wrapped
|
out wrapped
|
||||||
libc libc libc
|
libc libc libc
|
||||||
,(glibc-dynamic-linker)))))
|
,(glibc-dynamic-linker)))))
|
||||||
(chmod program #o555)))
|
(chmod program #o555))
|
||||||
'())
|
|
||||||
|
|
||||||
(with-directory-excursion out
|
(with-directory-excursion out
|
||||||
(invoke tar "xvf"
|
(invoke tar "xvf"
|
||||||
|
@ -896,21 +894,10 @@ exec ~a/bin/~a -B~a/lib \
|
||||||
|
|
||||||
(with-directory-excursion bindir
|
(with-directory-excursion bindir
|
||||||
(chmod "." #o755)
|
(chmod "." #o755)
|
||||||
,@(if (target-hurd64?)
|
(for-each wrap-program
|
||||||
`((for-each wrap-program '("gcc" "g++")))
|
,(if (target-hurd64?)
|
||||||
`((rename-file "gcc" ".gcc-wrapped")
|
''("gcc" "g++")
|
||||||
(call-with-output-file "gcc"
|
''("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))))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
|
||||||
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
("xz" ,(bootstrap-executable "xz" (%current-system)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue