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.
This commit is contained in:
Jan Nieuwenhuizen 2018-09-18 22:25:27 +02:00
parent f50b013f8c
commit 517af02ea1
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 28 additions and 26 deletions

View File

@ -630,33 +630,35 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define static-bash-for-glibc (define static-bash-for-glibc
;; A statically-linked Bash to be used by GLIBC-FINAL in system(3) & co. ;; A statically-linked Bash to be used by GLIBC-FINAL in system(3) & co.
(let* ((gcc (cross-gcc-wrapper gcc-boot0 binutils-boot0 (let ((bash (package
glibc-final-with-bootstrap-bash (inherit static-bash)
(car (assoc-ref (%boot1-inputs) "bash")))) (arguments
(bash (package (substitute-keyword-arguments
(inherit static-bash) (package-arguments static-bash)
(arguments ((#:guile _ #f)
(substitute-keyword-arguments '%bootstrap-guile)
(package-arguments static-bash) ((#:configure-flags flags '())
((#:guile _ #f) ;; Add a '-L' flag so that the pseudo-cross-ld of
'%bootstrap-guile) ;; BINUTILS-BOOT0 can find libc.a.
((#:configure-flags flags '()) `(append ,flags
;; Add a '-L' flag so that the pseudo-cross-ld of (list (string-append "LDFLAGS=-static -L"
;; BINUTILS-BOOT0 can find libc.a. (assoc-ref %build-inputs
`(append ,flags "libc:static")
(list (string-append "LDFLAGS=-static -L" "/lib")))))))))
(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")))))
(package-with-bootstrap-guile (package-with-bootstrap-guile
(package-with-explicit-inputs bash (lambda _ inputs) (package-with-explicit-inputs
(current-source-location) bash
#:guile %bootstrap-guile)))) (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 (define gettext-boot0
;; A minimal gettext used during bootstrap. ;; A minimal gettext used during bootstrap.