[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gc
From: |
Janneke Nieuwenhuizen |
Subject: |
[bug#74689] [PATCH v2 3/3] Partial revert "gnu: bootstrap: %bootstrap-gcc: Also wrap g++ for the 64bit Hurd." |
Date: |
Wed, 04 Dec 2024 18:07:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Zheng Junjie writes:
> This partially reverts commit 877b925df16740f9419d165d39cb7f191a86d5d1.
>
> This part accidentally triggered a world rebuild for non-x86 architectures.
>
> Change-Id: Iabc5422bb0e2bb37816ad437994af94d04830cb0
> ---
> gnu/packages/bootstrap.scm | 59 +++++++++++++++++++++++---------------
> 1 file changed, 36 insertions(+), 23 deletions(-)
>
> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index dcf385b03e9..f2620f844c3 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
LGTM!
> @@ -775,14 +775,14 @@ (define %bootstrap-glibc
> (chmod "lib" #o755)
>
> ;; Patch linker scripts so they refer to the right file-names.
> - ,(if (target-hurd64?)
> - '(substitute* '("lib/libc.so" "lib/libm.so")
> - (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
> - (string-append out "/lib/" prefix)))
> - '(substitute* "lib/libc.so"
> - (("/[^ ]+/lib/(libc|ld)" _ prefix)
> - (string-append out "/lib/" prefix))))
> - #t))))))
> + ,@(if (target-hurd64?)
> + '((substitute* '("lib/libc.so" "lib/libm.so")
> + (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
> + (string-append out "/lib/" prefix))))
> + '((substitute* "lib/libc.so"
> + (("/[^ ]+/lib/(libc|ld)" _ prefix)
> + (string-append out "/lib/" prefix)))
> + #t))))))))
> (inputs
> `(("tar" ,(bootstrap-executable "tar" (%current-system)))
> ("xz" ,(bootstrap-executable "xz" (%current-system)))
> @@ -874,20 +874,22 @@ (define %bootstrap-gcc
> (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
> + ,@(if (target-hurd64?)
> + `((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))
> + bash
> + out wrapped
> + libc libc libc
> + ,(glibc-dynamic-linker)))))
> + (chmod program #o555)))
> + '())
>
> (with-directory-excursion out
> (invoke tar "xvf"
> @@ -895,10 +897,21 @@ (define %bootstrap-gcc
>
> (with-directory-excursion bindir
> (chmod "." #o755)
> - (for-each wrap-program
> - ,(if (target-hurd64?)
> - ''("gcc" "g++")
> - ''("gcc")))))))))
> + ,@(if (target-hurd64?)
> + `((for-each wrap-program '("gcc" "g++")))
> + `((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))))))))
> (inputs
> `(("tar" ,(bootstrap-executable "tar" (%current-system)))
> ("xz" ,(bootstrap-executable "xz" (%current-system)))
--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
- [bug#74689] [PATCH 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd.", (continued)
[bug#74689] [PATCH 2/3] Partial revert "gnu: bootstrap: %bootstrap-glibc: Also fix libm.so.", Zheng Junjie, 2024/12/04
[bug#74689] [PATCH v2 1/3] Partial revert "gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd.", Zheng Junjie, 2024/12/04
bug#74689: [PATCH 0/3] fix non-x86 world rebuild, Ludovic Courtès, 2024/12/10