guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: squash! gnu: bootstrap: %bootstrap-gcc: Also wrap g++.


From: guix-commits
Subject: 02/03: squash! gnu: bootstrap: %bootstrap-gcc: Also wrap g++.
Date: Thu, 21 Nov 2024 03:22:30 -0500 (EST)

janneke pushed a commit to branch hurd-team
in repository guix.

commit 8d001ce9a2282e5d7eced5a117bb6407ba545b3b
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Thu Nov 21 08:19:14 2024 +0100

    squash! gnu: bootstrap: %bootstrap-gcc: Also wrap g++.
    
    Also, for-each instead of map, wrap-program/program instead of
    wrap-compiler/compiler.
    
    Change-Id: I8de155f28f02f4b29c9aac354b1a1a1372c98691
---
 gnu/packages/bootstrap.scm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 9d37f9bc22..e1ce59d7d1 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -874,22 +874,23 @@ $out/bin/guile --version~%"
                (invoke tar "xvf"
                        (string-append builddir "/binaries.tar")))
 
-             (define (wrap-compiler compiler)
-               (let ((wrapped (format #f ".~a-wrapped" compiler)))
-                 (rename-file compiler wrapped)
-                 (call-with-output-file compiler
+             (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
+                             out wrapped
+                             libc libc libc
                              ,(glibc-dynamic-linker)))))
-               (chmod compiler #o555))
+               (chmod program #o555))
              (with-directory-excursion bindir
                (chmod "." #o755)
-               (map wrap-compiler '("gcc" "g++"))))))))
+               (for-each wrap-program '("gcc" "g++"))))))))
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]