summary refs log tree commit diff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2018-09-18 22:25:27 +0200
committerJan Nieuwenhuizen <janneke@gnu.org>2018-09-23 09:46:25 +0200
commit517af02ea1de95ecbde3fa265f3e40b4e44c0eca (patch)
tree43a0e1c2d35f9e3bf2aa6b9e3b72c1f8111c3da5 /gnu/packages/commencement.scm
parentf50b013f8ce7606f3769ef02c09b4f7e0620686b (diff)
downloadguix-517af02ea1de95ecbde3fa265f3e40b4e44c0eca.tar.gz
bootstrap: static-bash-for-glibc: Consider %current-system at run time.
* gnu/packages/commencement.scm (static-bash-for-glibc): Rewrite so
that (%boot1-inputs) is evaluated run time, rather than at load time.
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm54
1 files changed, 28 insertions, 26 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ea30694475..84d834f5c1 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -630,33 +630,35 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
 
 (define static-bash-for-glibc
   ;; A statically-linked Bash to be used by GLIBC-FINAL in system(3) & co.
-  (let* ((gcc  (cross-gcc-wrapper gcc-boot0 binutils-boot0
-                                  glibc-final-with-bootstrap-bash
-                                  (car (assoc-ref (%boot1-inputs) "bash"))))
-         (bash (package
-                 (inherit static-bash)
-                 (arguments
-                  (substitute-keyword-arguments
-                      (package-arguments static-bash)
-                    ((#:guile _ #f)
-                     '%bootstrap-guile)
-                    ((#:configure-flags flags '())
-                     ;; Add a '-L' flag so that the pseudo-cross-ld of
-                     ;; BINUTILS-BOOT0 can find libc.a.
-                     `(append ,flags
-                              (list (string-append "LDFLAGS=-static -L"
-                                                   (assoc-ref %build-inputs
-                                                              "libc:static")
-                                                   "/lib"))))))))
-         (inputs `(("gcc" ,gcc)
-                   ("libc" ,glibc-final-with-bootstrap-bash)
-                   ("libc:static" ,glibc-final-with-bootstrap-bash "static")
-                   ,@(fold alist-delete (%boot1-inputs)
-                           '("gcc" "libc")))))
+  (let ((bash (package
+                (inherit static-bash)
+                (arguments
+                 (substitute-keyword-arguments
+                     (package-arguments static-bash)
+                   ((#:guile _ #f)
+                    '%bootstrap-guile)
+                   ((#:configure-flags flags '())
+                    ;; Add a '-L' flag so that the pseudo-cross-ld of
+                    ;; BINUTILS-BOOT0 can find libc.a.
+                    `(append ,flags
+                             (list (string-append "LDFLAGS=-static -L"
+                                                  (assoc-ref %build-inputs
+                                                             "libc:static")
+                                                  "/lib")))))))))
     (package-with-bootstrap-guile
-     (package-with-explicit-inputs bash (lambda _ inputs)
-                                   (current-source-location)
-                                   #:guile %bootstrap-guile))))
+     (package-with-explicit-inputs
+      bash
+      (lambda _
+        (let ((gcc  (cross-gcc-wrapper gcc-boot0 binutils-boot0
+                                       glibc-final-with-bootstrap-bash
+                                       (car (assoc-ref (%boot1-inputs) "bash")))))
+          `(("gcc" ,gcc)
+            ("libc" ,glibc-final-with-bootstrap-bash)
+            ("libc:static" ,glibc-final-with-bootstrap-bash "static")
+            ,@(fold alist-delete (%boot1-inputs)
+                    '("gcc" "libc")))))
+      (current-source-location)
+      #:guile %bootstrap-guile))))
 
 (define gettext-boot0
   ;; A minimal gettext used during bootstrap.