bootstrap: Use thunk for inputs in package-with-explicit-inputs.
* gnu/packages/commencement.scm (diffutils-boot0, findutils-boot0, perl-boot0, bison-boot0, flex-boot0, texinfo-boot0, static-bash-for-glibc, gettext-boot0, bash-final, guile-final, glibc-utf8-locales-final, gnu-make-final, coreutils-final, grep-final, sed-final, %final-inputs): Use thunk for inputs in package-with-explicit-inputs. This makes --system=i686-linux behave identical to a native x86 build and prepares for Mes bootstrap. (ld-wrapper-boot0, ld-wrapper-boot3): Change to procedure. Explicitly add #:guile-for-build. Update users.
This commit is contained in:
parent
32f4a073e1
commit
f50b013f8c
1 changed files with 44 additions and 38 deletions
|
@ -109,8 +109,9 @@
|
||||||
(define diffutils-boot0
|
(define diffutils-boot0
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(let ((p (package-with-explicit-inputs diffutils
|
(let ((p (package-with-explicit-inputs diffutils
|
||||||
`(("make" ,gnu-make-boot0)
|
(lambda _
|
||||||
,@(%bootstrap-inputs+toolchain))
|
`(("make" ,gnu-make-boot0)
|
||||||
|
,@(%bootstrap-inputs+toolchain)))
|
||||||
#:guile %bootstrap-guile)))
|
#:guile %bootstrap-guile)))
|
||||||
(package (inherit p)
|
(package (inherit p)
|
||||||
(name "diffutils-boot0")
|
(name "diffutils-boot0")
|
||||||
|
@ -122,9 +123,10 @@
|
||||||
(package-with-explicit-inputs (package
|
(package-with-explicit-inputs (package
|
||||||
(inherit findutils)
|
(inherit findutils)
|
||||||
(name "findutils-boot0"))
|
(name "findutils-boot0"))
|
||||||
`(("make" ,gnu-make-boot0)
|
(lambda _
|
||||||
("diffutils" ,diffutils-boot0) ; for tests
|
`(("make" ,gnu-make-boot0)
|
||||||
,@(%bootstrap-inputs+toolchain))
|
("diffutils" ,diffutils-boot0) ; for tests
|
||||||
|
,@(%bootstrap-inputs+toolchain)))
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile)))
|
#:guile %bootstrap-guile)))
|
||||||
|
|
||||||
|
@ -132,9 +134,13 @@
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs (package
|
(package-with-explicit-inputs (package
|
||||||
(inherit file)
|
(inherit file)
|
||||||
(name "file-boot0"))
|
(name "file-boot0")
|
||||||
`(("make" ,gnu-make-boot0)
|
(arguments
|
||||||
,@(%bootstrap-inputs+toolchain))
|
'(#:strip-binaries? #f
|
||||||
|
#:validate-runpath? #f)))
|
||||||
|
(lambda _
|
||||||
|
`(("make" ,gnu-make-boot0)
|
||||||
|
,@(%bootstrap-inputs+toolchain)))
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile)))
|
#:guile %bootstrap-guile)))
|
||||||
|
|
||||||
|
@ -342,7 +348,7 @@
|
||||||
`(delete "-Dusethreads" ,configure-flags))))))))
|
`(delete "-Dusethreads" ,configure-flags))))))))
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs perl
|
(package-with-explicit-inputs perl
|
||||||
(%boot0-inputs)
|
%boot0-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile))))
|
#:guile %bootstrap-guile))))
|
||||||
|
|
||||||
|
@ -361,11 +367,7 @@
|
||||||
;; This Bison is needed to build MiG so we need it early in the process.
|
;; This Bison is needed to build MiG so we need it early in the process.
|
||||||
;; It is also needed to rebuild Bash's parser, which is modified by
|
;; It is also needed to rebuild Bash's parser, which is modified by
|
||||||
;; its CVE patches. Remove it when it's no longer needed.
|
;; its CVE patches. Remove it when it's no longer needed.
|
||||||
(let* ((m4 (package-with-bootstrap-guile
|
(let* ((bison (package (inherit bison)
|
||||||
(package-with-explicit-inputs m4 (%boot0-inputs)
|
|
||||||
(current-source-location)
|
|
||||||
#:guile %bootstrap-guile)))
|
|
||||||
(bison (package (inherit bison)
|
|
||||||
(propagated-inputs `(("m4" ,m4)))
|
(propagated-inputs `(("m4" ,m4)))
|
||||||
(inputs '()) ;remove Flex...
|
(inputs '()) ;remove Flex...
|
||||||
(arguments
|
(arguments
|
||||||
|
@ -374,11 +376,12 @@
|
||||||
;; Zero timestamps in liby.a; this must be done
|
;; Zero timestamps in liby.a; this must be done
|
||||||
;; explicitly here because the bootstrap Binutils don't
|
;; explicitly here because the bootstrap Binutils don't
|
||||||
;; do that (default is "cru".)
|
;; do that (default is "cru".)
|
||||||
#:make-flags '("ARFLAGS=crD" "RANLIB=ranlib -D"
|
#:make-flags '("ARFLAGS=crD"
|
||||||
|
"RANLIB=ranlib -D"
|
||||||
"V=1"))))))
|
"V=1"))))))
|
||||||
(package
|
(package
|
||||||
(inherit (package-with-bootstrap-guile
|
(inherit (package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs bison (%boot0-inputs)
|
(package-with-explicit-inputs bison %boot0-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile)))
|
#:guile %bootstrap-guile)))
|
||||||
(native-inputs `(("perl" ,perl-boot0))))))
|
(native-inputs `(("perl" ,perl-boot0))))))
|
||||||
|
@ -391,7 +394,7 @@
|
||||||
(inputs `(("indent" ,indent)))
|
(inputs `(("indent" ,indent)))
|
||||||
(arguments '(#:tests? #f)))))
|
(arguments '(#:tests? #f)))))
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs flex (%boot0-inputs)
|
(package-with-explicit-inputs flex %boot0-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile))))
|
#:guile %bootstrap-guile))))
|
||||||
|
|
||||||
|
@ -483,23 +486,24 @@ the bootstrap environment."
|
||||||
;; UTF-8 locale at this stage, so skip them.
|
;; UTF-8 locale at this stage, so skip them.
|
||||||
(arguments '(#:tests? #f)))))
|
(arguments '(#:tests? #f)))))
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs texinfo (%boot0-inputs)
|
(package-with-explicit-inputs texinfo %boot0-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile))))
|
#:guile %bootstrap-guile))))
|
||||||
|
|
||||||
(define ld-wrapper-boot0
|
(define (ld-wrapper-boot0)
|
||||||
;; We need this so binaries on Hurd will have libmachuser and libhurduser
|
;; We need this so binaries on Hurd will have libmachuser and libhurduser
|
||||||
;; in their RUNPATH, otherwise validate-runpath will fail.
|
;; in their RUNPATH, otherwise validate-runpath will fail.
|
||||||
(make-ld-wrapper "ld-wrapper-boot0"
|
(make-ld-wrapper "ld-wrapper-boot0"
|
||||||
#:target boot-triplet
|
#:target boot-triplet
|
||||||
#:binutils binutils-boot0
|
#:binutils binutils-boot0
|
||||||
#:guile %bootstrap-guile
|
#:guile %bootstrap-guile
|
||||||
#:bash (car (assoc-ref (%boot0-inputs) "bash"))))
|
#:bash (car (assoc-ref (%boot0-inputs) "bash"))
|
||||||
|
#:guile-for-build %bootstrap-guile))
|
||||||
|
|
||||||
(define (%boot1-inputs)
|
(define (%boot1-inputs)
|
||||||
;; 2nd stage inputs.
|
;; 2nd stage inputs.
|
||||||
`(("gcc" ,gcc-boot0)
|
`(("gcc" ,gcc-boot0)
|
||||||
("ld-wrapper-cross" ,ld-wrapper-boot0)
|
("ld-wrapper-cross" ,(ld-wrapper-boot0))
|
||||||
("binutils-cross" ,binutils-boot0)
|
("binutils-cross" ,binutils-boot0)
|
||||||
,@(alist-delete "binutils" (%boot0-inputs))))
|
,@(alist-delete "binutils" (%boot0-inputs))))
|
||||||
|
|
||||||
|
@ -650,7 +654,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
,@(fold alist-delete (%boot1-inputs)
|
,@(fold alist-delete (%boot1-inputs)
|
||||||
'("gcc" "libc")))))
|
'("gcc" "libc")))))
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs bash inputs
|
(package-with-explicit-inputs bash (lambda _ inputs)
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile))))
|
#:guile %bootstrap-guile))))
|
||||||
|
|
||||||
|
@ -685,7 +689,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(delete 'patch-tests))))))))
|
(delete 'patch-tests))))))))
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs gettext-minimal
|
(package-with-explicit-inputs gettext-minimal
|
||||||
(%boot1-inputs)
|
%boot1-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile))))
|
#:guile %bootstrap-guile))))
|
||||||
|
|
||||||
|
@ -718,7 +722,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
|
|
||||||
,@(package-arguments glibc-final-with-bootstrap-bash))))))
|
,@(package-arguments glibc-final-with-bootstrap-bash))))))
|
||||||
|
|
||||||
(define gcc-boot0-wrapped
|
(define (gcc-boot0-wrapped)
|
||||||
;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the
|
;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the
|
||||||
;; non-cross names.
|
;; non-cross names.
|
||||||
(cross-gcc-wrapper gcc-boot0 binutils-boot0 glibc-final
|
(cross-gcc-wrapper gcc-boot0 binutils-boot0 glibc-final
|
||||||
|
@ -728,7 +732,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
;; 3rd stage inputs.
|
;; 3rd stage inputs.
|
||||||
`(("libc" ,glibc-final)
|
`(("libc" ,glibc-final)
|
||||||
("libc:static" ,glibc-final "static")
|
("libc:static" ,glibc-final "static")
|
||||||
("gcc" ,gcc-boot0-wrapped)
|
("gcc" ,(gcc-boot0-wrapped))
|
||||||
,@(fold alist-delete (%boot1-inputs) '("libc" "gcc"))))
|
,@(fold alist-delete (%boot1-inputs) '("libc" "gcc"))))
|
||||||
|
|
||||||
(define binutils-final
|
(define binutils-final
|
||||||
|
@ -780,12 +784,13 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
,@(package-arguments zlib)))
|
,@(package-arguments zlib)))
|
||||||
(inputs (%boot2-inputs)))))
|
(inputs (%boot2-inputs)))))
|
||||||
|
|
||||||
(define ld-wrapper-boot3
|
(define (ld-wrapper-boot3)
|
||||||
;; A linker wrapper that uses the bootstrap Guile.
|
;; A linker wrapper that uses the bootstrap Guile.
|
||||||
(make-ld-wrapper "ld-wrapper-boot3"
|
(make-ld-wrapper "ld-wrapper-boot3"
|
||||||
#:binutils binutils-final
|
#:binutils binutils-final
|
||||||
#:guile %bootstrap-guile
|
#:guile %bootstrap-guile
|
||||||
#:bash (car (assoc-ref (%boot2-inputs) "bash"))))
|
#:bash (car (assoc-ref (%boot2-inputs) "bash"))
|
||||||
|
#:guile-for-build %bootstrap-guile))
|
||||||
|
|
||||||
(define gcc-final
|
(define gcc-final
|
||||||
;; The final GCC.
|
;; The final GCC.
|
||||||
|
@ -846,7 +851,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
|
(inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
|
||||||
("mpfr-source" ,(package-source mpfr))
|
("mpfr-source" ,(package-source mpfr))
|
||||||
("mpc-source" ,(package-source mpc))
|
("mpc-source" ,(package-source mpc))
|
||||||
("ld-wrapper" ,ld-wrapper-boot3)
|
("ld-wrapper" ,(ld-wrapper-boot3))
|
||||||
("binutils" ,binutils-final)
|
("binutils" ,binutils-final)
|
||||||
("libstdc++" ,libstdc++)
|
("libstdc++" ,libstdc++)
|
||||||
("zlib" ,zlib-final)
|
("zlib" ,zlib-final)
|
||||||
|
@ -855,7 +860,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(define (%boot3-inputs)
|
(define (%boot3-inputs)
|
||||||
;; 4th stage inputs.
|
;; 4th stage inputs.
|
||||||
`(("gcc" ,gcc-final)
|
`(("gcc" ,gcc-final)
|
||||||
("ld-wrapper" ,ld-wrapper-boot3)
|
("ld-wrapper" ,(ld-wrapper-boot3))
|
||||||
,@(alist-delete "gcc" (%boot2-inputs))))
|
,@(alist-delete "gcc" (%boot2-inputs))))
|
||||||
|
|
||||||
(define bash-final
|
(define bash-final
|
||||||
|
@ -870,7 +875,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
,@(package-arguments bash-minimal))))))
|
,@(package-arguments bash-minimal))))))
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs (static-libgcc-package bash)
|
(package-with-explicit-inputs (static-libgcc-package bash)
|
||||||
(%boot3-inputs)
|
%boot3-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile))))
|
#:guile %bootstrap-guile))))
|
||||||
|
|
||||||
|
@ -884,7 +889,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
;; mark it as hidden so that 'fold-packages' ignores it.
|
;; mark it as hidden so that 'fold-packages' ignores it.
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs (hidden-package guile-2.2/fixed)
|
(package-with-explicit-inputs (hidden-package guile-2.2/fixed)
|
||||||
(%boot4-inputs)
|
%boot4-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile)))
|
#:guile %bootstrap-guile)))
|
||||||
|
|
||||||
|
@ -898,7 +903,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(inherit glibc-utf8-locales)
|
(inherit glibc-utf8-locales)
|
||||||
(inputs `(("glibc" ,glibc-final)
|
(inputs `(("glibc" ,glibc-final)
|
||||||
("gzip"
|
("gzip"
|
||||||
,(package-with-explicit-inputs gzip (%boot4-inputs)
|
,(package-with-explicit-inputs gzip %boot4-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile %bootstrap-guile))))))
|
#:guile %bootstrap-guile))))))
|
||||||
|
|
||||||
|
@ -920,8 +925,9 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
;; The final GNU Make, which uses the final Guile.
|
;; The final GNU Make, which uses the final Guile.
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs gnu-make
|
(package-with-explicit-inputs gnu-make
|
||||||
`(("guile" ,guile-final)
|
(lambda _
|
||||||
,@(%boot5-inputs))
|
`(("guile" ,guile-final)
|
||||||
|
,@(%boot5-inputs)))
|
||||||
(current-source-location))))
|
(current-source-location))))
|
||||||
|
|
||||||
(define coreutils-final
|
(define coreutils-final
|
||||||
|
@ -929,7 +935,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
;; Findutils, keep a reference to the Coreutils they were built with.
|
;; Findutils, keep a reference to the Coreutils they were built with.
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs coreutils
|
(package-with-explicit-inputs coreutils
|
||||||
(%boot5-inputs)
|
%boot5-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
|
|
||||||
;; Use the final Guile, linked against the
|
;; Use the final Guile, linked against the
|
||||||
|
@ -942,7 +948,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
;; The final grep. Gzip holds a reference to it (via zgrep), so it must be
|
;; The final grep. Gzip holds a reference to it (via zgrep), so it must be
|
||||||
;; built before gzip.
|
;; built before gzip.
|
||||||
(let ((grep (package-with-bootstrap-guile
|
(let ((grep (package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs grep (%boot5-inputs)
|
(package-with-explicit-inputs grep %boot5-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile guile-final))))
|
#:guile guile-final))))
|
||||||
(package/inherit grep
|
(package/inherit grep
|
||||||
|
@ -958,7 +964,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(define sed-final
|
(define sed-final
|
||||||
;; The final sed.
|
;; The final sed.
|
||||||
(let ((sed (package-with-bootstrap-guile
|
(let ((sed (package-with-bootstrap-guile
|
||||||
(package-with-explicit-inputs sed (%boot6-inputs)
|
(package-with-explicit-inputs sed %boot6-inputs
|
||||||
(current-source-location)
|
(current-source-location)
|
||||||
#:guile guile-final))))
|
#:guile guile-final))))
|
||||||
(package/inherit sed (native-inputs `(("perl" ,perl-boot0))))))
|
(package/inherit sed (native-inputs `(("perl" ,perl-boot0))))))
|
||||||
|
@ -969,7 +975,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
;; used for origins that have patches, thereby avoiding circular
|
;; used for origins that have patches, thereby avoiding circular
|
||||||
;; dependencies.
|
;; dependencies.
|
||||||
(let ((finalize (compose package-with-bootstrap-guile
|
(let ((finalize (compose package-with-bootstrap-guile
|
||||||
(cut package-with-explicit-inputs <> (%boot6-inputs)
|
(cut package-with-explicit-inputs <> %boot6-inputs
|
||||||
(current-source-location)))))
|
(current-source-location)))))
|
||||||
`(,@(map (match-lambda
|
`(,@(map (match-lambda
|
||||||
((name package)
|
((name package)
|
||||||
|
|
Reference in a new issue