gnu: commencement: Reduce the graph of package objects.
The graph returned by: guix graph -e '(@@ (gnu packages commencement) guile-final)' now contains 94 nodes (664 edges) instead of 394 (2674 edges). Likewise, this command: GUIX_PROFILING=add-data-to-store-cache guix build coreutils -nd shows that the number of lookups to the 'add-data-to-store' caches goes from 8935 to 5303. Overall, "guix build libreoffice -nd" goes from 3.17s to 2.60s (-18%). * gnu/packages/commencement.scm (diffutils-boot0): Remove call to 'package-with-bootstrap-guile' and 'package-with-explicit-inputs', and adjust accordingly. (findutils-boot0, file-boot0, binutils-boot0, libstdc++-boot0) (gcc-boot0, perl-boot0, m4-boot0, bison-boot0, flex-boot0) (linux-libre-headers-boot0, texinfo-boot0, python-boot0) (ld-wrapper-boot0, glibc-final-with-bootstrap-bash) (static-bash-for-glibc, gettext-boot0, glibc-final, binutils-final) (libstdc++, zlib-final, bash-final): Likewise. (expat-sans-tests)[inputs]: New field. [arguments]: Add #:implicit-inputs? and #:guile. (m4-boot0*): New variable.
This commit is contained in:
parent
9a45a24f7f
commit
99b73d0f0c
1 changed files with 496 additions and 478 deletions
|
@ -1425,43 +1425,46 @@ exec " gcc "/bin/" program
|
||||||
(inputs (%bootstrap-inputs+toolchain))))
|
(inputs (%bootstrap-inputs+toolchain))))
|
||||||
|
|
||||||
(define diffutils-boot0
|
(define diffutils-boot0
|
||||||
(package-with-bootstrap-guile
|
(package
|
||||||
(let ((p (package-with-explicit-inputs diffutils
|
(inherit diffutils)
|
||||||
(lambda _
|
|
||||||
`(("make" ,gnu-make-boot0)
|
|
||||||
,@(%bootstrap-inputs+toolchain)))
|
|
||||||
#:guile %bootstrap-guile)))
|
|
||||||
(package (inherit p)
|
|
||||||
(name "diffutils-boot0")
|
(name "diffutils-boot0")
|
||||||
(native-inputs `())
|
(native-inputs `())
|
||||||
(arguments `(#:tests? #f ; the test suite needs diffutils
|
(inputs
|
||||||
,@(package-arguments p)))))))
|
`(("make" ,gnu-make-boot0)
|
||||||
|
,@(%bootstrap-inputs+toolchain)))
|
||||||
|
(arguments
|
||||||
|
`(#:tests? #f ; the test suite needs diffutils
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
#:implicit-inputs? #f
|
||||||
|
,@(package-arguments diffutils)))))
|
||||||
|
|
||||||
(define findutils-boot0
|
(define findutils-boot0
|
||||||
(package-with-bootstrap-guile
|
(package
|
||||||
(package-with-explicit-inputs (package
|
|
||||||
(inherit findutils)
|
(inherit findutils)
|
||||||
(name "findutils-boot0"))
|
(name "findutils-boot0")
|
||||||
(lambda _
|
(source (bootstrap-origin (package-source findutils)))
|
||||||
|
(inputs
|
||||||
`(("make" ,gnu-make-boot0)
|
`(("make" ,gnu-make-boot0)
|
||||||
("diffutils" ,diffutils-boot0) ; for tests
|
("diffutils" ,diffutils-boot0) ; for tests
|
||||||
,@(%bootstrap-inputs+toolchain)))
|
,@(%bootstrap-inputs+toolchain)))
|
||||||
(current-source-location)
|
(arguments
|
||||||
#:guile %bootstrap-guile)))
|
`(#:implicit-inputs? #f
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
,@(package-arguments findutils)))))
|
||||||
|
|
||||||
(define file-boot0
|
(define file-boot0
|
||||||
(package-with-bootstrap-guile
|
(package
|
||||||
(package-with-explicit-inputs (package
|
|
||||||
(inherit file)
|
(inherit file)
|
||||||
|
(source (bootstrap-origin (package-source file)))
|
||||||
(name "file-boot0")
|
(name "file-boot0")
|
||||||
(arguments
|
(inputs
|
||||||
'(#:strip-binaries? #f
|
|
||||||
#:validate-runpath? #f)))
|
|
||||||
(lambda _
|
|
||||||
`(("make" ,gnu-make-boot0)
|
`(("make" ,gnu-make-boot0)
|
||||||
,@(%bootstrap-inputs+toolchain)))
|
,@(%bootstrap-inputs+toolchain)))
|
||||||
(current-source-location)
|
(arguments
|
||||||
#:guile %bootstrap-guile)))
|
`(#:implicit-inputs? #f
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
#:strip-binaries? #f
|
||||||
|
#:validate-runpath? #f))))
|
||||||
|
|
||||||
(define (%boot0-inputs)
|
(define (%boot0-inputs)
|
||||||
`(("make" ,gnu-make-boot0)
|
`(("make" ,gnu-make-boot0)
|
||||||
|
@ -1482,8 +1485,9 @@ exec " gcc "/bin/" program
|
||||||
;; reference to the target libc.
|
;; reference to the target libc.
|
||||||
|
|
||||||
(define binutils-boot0
|
(define binutils-boot0
|
||||||
(package-with-bootstrap-guile
|
(package
|
||||||
(package (inherit binutils)
|
(inherit binutils)
|
||||||
|
(source (bootstrap-origin (package-source binutils)))
|
||||||
(name "binutils-cross-boot0")
|
(name "binutils-cross-boot0")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
|
@ -1513,16 +1517,17 @@ exec " gcc "/bin/" program
|
||||||
((#:configure-flags cf)
|
((#:configure-flags cf)
|
||||||
`(cons ,(string-append "--target=" (boot-triplet))
|
`(cons ,(string-append "--target=" (boot-triplet))
|
||||||
,cf)))))
|
,cf)))))
|
||||||
(inputs (%boot0-inputs)))))
|
(inputs (%boot0-inputs))))
|
||||||
|
|
||||||
(define libstdc++-boot0
|
(define libstdc++-boot0
|
||||||
;; GCC's libcc1 is always built as a shared library (the top-level
|
;; GCC's libcc1 is always built as a shared library (the top-level
|
||||||
;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to refer
|
;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to refer
|
||||||
;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on
|
;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on
|
||||||
;; C++14 features missing in some of our bootstrap compilers.
|
;; C++14 features missing in some of our bootstrap compilers.
|
||||||
(let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc-4.9))))
|
(let ((lib (make-libstdc++ gcc-4.9)))
|
||||||
(package
|
(package
|
||||||
(inherit lib)
|
(inherit lib)
|
||||||
|
(source (bootstrap-origin (package-source lib)))
|
||||||
(name "libstdc++-boot0")
|
(name "libstdc++-boot0")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
|
@ -1548,9 +1553,10 @@ exec " gcc "/bin/" program
|
||||||
(native-inputs '()))))
|
(native-inputs '()))))
|
||||||
|
|
||||||
(define gcc-boot0
|
(define gcc-boot0
|
||||||
(package-with-bootstrap-guile
|
(package
|
||||||
(package (inherit gcc)
|
(inherit gcc)
|
||||||
(name "gcc-cross-boot0")
|
(name "gcc-cross-boot0")
|
||||||
|
(source (bootstrap-origin (package-source gcc)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
#:implicit-inputs? #f
|
#:implicit-inputs? #f
|
||||||
|
@ -1653,9 +1659,9 @@ exec " gcc "/bin/" program
|
||||||
(symlink "libgcc.a" "libgcc_eh.a"))
|
(symlink "libgcc.a" "libgcc_eh.a"))
|
||||||
#t))))))))
|
#t))))))))
|
||||||
|
|
||||||
(inputs `(("gmp-source" ,(package-source gmp-6.0))
|
(inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
|
||||||
("mpfr-source" ,(package-source mpfr))
|
("mpfr-source" ,(bootstrap-origin (package-source mpfr)))
|
||||||
("mpc-source" ,(package-source mpc))
|
("mpc-source" ,(bootstrap-origin (package-source mpc)))
|
||||||
("binutils-cross" ,binutils-boot0)
|
("binutils-cross" ,binutils-boot0)
|
||||||
|
|
||||||
;; The libstdc++ that libcc1 links against.
|
;; The libstdc++ that libcc1 links against.
|
||||||
|
@ -1667,18 +1673,22 @@ exec " gcc "/bin/" program
|
||||||
,@(alist-delete "libc" (%boot0-inputs))))
|
,@(alist-delete "libc" (%boot0-inputs))))
|
||||||
|
|
||||||
;; No need for the native-inputs to build the documentation at this stage.
|
;; No need for the native-inputs to build the documentation at this stage.
|
||||||
(native-inputs `()))))
|
(native-inputs `())))
|
||||||
|
|
||||||
(define perl-boot0
|
(define perl-boot0
|
||||||
(let ((perl (package
|
(package
|
||||||
(inherit perl)
|
(inherit perl)
|
||||||
(name "perl-boot0")
|
(name "perl-boot0")
|
||||||
|
(source (bootstrap-origin (package-source perl)))
|
||||||
|
(inputs (%boot0-inputs))
|
||||||
(arguments
|
(arguments
|
||||||
|
`(#:implicit-inputs? #f
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
#:validate-runpath? #f
|
||||||
|
|
||||||
;; At the very least, this must not depend on GCC & co.
|
;; At the very least, this must not depend on GCC & co.
|
||||||
(let ((args `(#:validate-runpath? #f
|
#:disallowed-references ,(list %bootstrap-binutils)
|
||||||
#:disallowed-references
|
|
||||||
,(list %bootstrap-binutils))))
|
|
||||||
`(,@args
|
|
||||||
,@(substitute-keyword-arguments (package-arguments perl)
|
,@(substitute-keyword-arguments (package-arguments perl)
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
`(modify-phases ,phases
|
||||||
|
@ -1693,32 +1703,39 @@ exec " gcc "/bin/" program
|
||||||
;; Do not configure with '-Dusethreads' since pthread
|
;; Do not configure with '-Dusethreads' since pthread
|
||||||
;; support is missing.
|
;; support is missing.
|
||||||
((#:configure-flags configure-flags)
|
((#:configure-flags configure-flags)
|
||||||
`(delete "-Dusethreads" ,configure-flags)))))))))
|
`(delete "-Dusethreads" ,configure-flags)))))))
|
||||||
(package-with-bootstrap-guile
|
|
||||||
(package-with-explicit-inputs perl
|
|
||||||
%boot0-inputs
|
|
||||||
(current-source-location)
|
|
||||||
#:guile %bootstrap-guile))))
|
|
||||||
|
|
||||||
(define m4-boot0
|
(define m4-boot0
|
||||||
(package-with-bootstrap-guile
|
|
||||||
(package
|
(package
|
||||||
(inherit m4)
|
(inherit m4)
|
||||||
(name "m4-boot0")
|
(name "m4-boot0")
|
||||||
|
(source (bootstrap-origin (package-source m4)))
|
||||||
(inputs (%boot0-inputs))
|
(inputs (%boot0-inputs))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
#:implicit-inputs? #f
|
#:implicit-inputs? #f
|
||||||
,@(package-arguments m4))))))
|
,@(package-arguments m4)))))
|
||||||
|
|
||||||
|
(define m4-boot0*
|
||||||
|
(package
|
||||||
|
;; TODO: On the next rebuild cycle, use M4-BOOT0 as is.
|
||||||
|
(inherit m4-boot0)
|
||||||
|
(name "m4")))
|
||||||
|
|
||||||
(define bison-boot0
|
(define bison-boot0
|
||||||
;; 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.
|
||||||
;; Recent versions of Linux-Libre headers also depend on this.
|
;; Recent versions of Linux-Libre headers also depend on this.
|
||||||
(let* ((bison (package (inherit bison)
|
(package
|
||||||
(propagated-inputs `(("m4" ,m4)))
|
(inherit bison)
|
||||||
(inputs '()) ;remove Flex...
|
;; TODO: On the next build cycle, do:
|
||||||
|
;;(name "bison-boot0")
|
||||||
|
(propagated-inputs `(("m4" ,m4-boot0*)))
|
||||||
|
(native-inputs `(("perl" ,perl-boot0)))
|
||||||
|
(inputs (%boot0-inputs)) ;remove Flex...
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ;... and thus disable tests
|
`(#:tests? #f ;... and thus disable tests
|
||||||
|
#:implicit-inputs? #f
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
|
||||||
;; XXX: These flags should be unconditional, but for now
|
;; XXX: These flags should be unconditional, but for now
|
||||||
;; we just add them on x86 to avoid a full rebuild.
|
;; we just add them on x86 to avoid a full rebuild.
|
||||||
|
@ -1741,25 +1758,24 @@ exec " gcc "/bin/" program
|
||||||
"RANLIB=ranlib")
|
"RANLIB=ranlib")
|
||||||
(_
|
(_
|
||||||
"RANLIB=ranlib -D"))
|
"RANLIB=ranlib -D"))
|
||||||
"V=1"))))))
|
"V=1")))))
|
||||||
(package
|
|
||||||
(inherit (package-with-bootstrap-guile
|
|
||||||
(package-with-explicit-inputs bison %boot0-inputs
|
|
||||||
(current-source-location)
|
|
||||||
#:guile %bootstrap-guile)))
|
|
||||||
(native-inputs `(("perl" ,perl-boot0))))))
|
|
||||||
|
|
||||||
(define flex-boot0
|
(define flex-boot0
|
||||||
;; This Flex is needed to build MiG as well as Linux-Libre headers.
|
;; This Flex is needed to build MiG as well as Linux-Libre headers.
|
||||||
(let* ((flex (package (inherit flex)
|
(package
|
||||||
|
(inherit flex)
|
||||||
(native-inputs `(("bison" ,bison-boot0)))
|
(native-inputs `(("bison" ,bison-boot0)))
|
||||||
(propagated-inputs `(("m4" ,m4)))
|
(propagated-inputs
|
||||||
(inputs '())
|
;; XXX: Here we use an 'm4-boot0' package that's not eq? so that it
|
||||||
(arguments '(#:tests? #f)))))
|
;; appears twice in '%build-inputs', like when we were using
|
||||||
(package-with-bootstrap-guile
|
;; 'package-with-explicit-inputs'.
|
||||||
(package-with-explicit-inputs flex %boot0-inputs
|
;; TODO: Remove this hack on the next rebuild cycle.
|
||||||
(current-source-location)
|
`(("m4" ,(package (inherit m4-boot0*)))))
|
||||||
#:guile %bootstrap-guile))))
|
(inputs (%boot0-inputs))
|
||||||
|
(arguments
|
||||||
|
`(#:implicit-inputs? #f
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
#:tests? #f))))
|
||||||
|
|
||||||
(define linux-libre-headers-boot0
|
(define linux-libre-headers-boot0
|
||||||
(mlambda ()
|
(mlambda ()
|
||||||
|
@ -1768,9 +1784,10 @@ exec " gcc "/bin/" program
|
||||||
;; between (gnu packages linux) and this module. Additionally, memoize
|
;; between (gnu packages linux) and this module. Additionally, memoize
|
||||||
;; the result to play well with further memoization and code that relies
|
;; the result to play well with further memoization and code that relies
|
||||||
;; on pointer identity; see <https://bugs.gnu.org/30155>.
|
;; on pointer identity; see <https://bugs.gnu.org/30155>.
|
||||||
(package-with-bootstrap-guile
|
(package
|
||||||
(package (inherit linux-libre-headers)
|
(inherit linux-libre-headers)
|
||||||
(arguments `(#:guile ,%bootstrap-guile
|
(arguments
|
||||||
|
`(#:guile ,%bootstrap-guile
|
||||||
#:implicit-inputs? #f
|
#:implicit-inputs? #f
|
||||||
,@(package-arguments linux-libre-headers)))
|
,@(package-arguments linux-libre-headers)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
@ -1779,7 +1796,7 @@ exec " gcc "/bin/" program
|
||||||
;; Flex and Bison are required since version 4.16.
|
;; Flex and Bison are required since version 4.16.
|
||||||
("flex" ,flex-boot0)
|
("flex" ,flex-boot0)
|
||||||
("bison" ,bison-boot0)
|
("bison" ,bison-boot0)
|
||||||
,@(%boot0-inputs)))))))
|
,@(%boot0-inputs))))))
|
||||||
|
|
||||||
(define gnumach-headers-boot0
|
(define gnumach-headers-boot0
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
|
@ -1844,57 +1861,66 @@ the bootstrap environment."
|
||||||
;; We build without ncurses because it fails to build at this stage, and
|
;; We build without ncurses because it fails to build at this stage, and
|
||||||
;; because we don't need the stand-alone Info reader.
|
;; because we don't need the stand-alone Info reader.
|
||||||
;; Also, use (%BOOT0-INPUTS) to avoid building Perl once more.
|
;; Also, use (%BOOT0-INPUTS) to avoid building Perl once more.
|
||||||
(let ((texinfo (package (inherit texinfo)
|
(package
|
||||||
|
(inherit texinfo)
|
||||||
(native-inputs '())
|
(native-inputs '())
|
||||||
(inputs `(("perl" ,perl-boot0)))
|
(inputs `(,@(%boot0-inputs)
|
||||||
|
("perl" ,perl-boot0)))
|
||||||
|
(arguments
|
||||||
|
`(#:implicit-inputs? #f
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
|
||||||
;; Some of Texinfo 6.1's tests would fail with "Couldn't
|
;; Some of Texinfo 6.1's tests would fail with "Couldn't set UTF-8
|
||||||
;; set UTF-8 character type in locale" but we don't have a
|
;; character type in locale" but we don't have a UTF-8 locale at this
|
||||||
;; UTF-8 locale at this stage, so skip them.
|
;; stage, so skip them.
|
||||||
(arguments '(#:tests? #f)))))
|
#:tests? #f))))
|
||||||
(package-with-bootstrap-guile
|
|
||||||
(package-with-explicit-inputs texinfo %boot0-inputs
|
|
||||||
(current-source-location)
|
|
||||||
#:guile %bootstrap-guile))))
|
|
||||||
|
|
||||||
(define expat-sans-tests
|
(define expat-sans-tests
|
||||||
(package
|
(package
|
||||||
(inherit expat)
|
(inherit expat)
|
||||||
|
(inputs (%boot0-inputs))
|
||||||
(arguments
|
(arguments
|
||||||
;; XXX: Linking 'runtestscpp' fails with things like:
|
;; XXX: Linking 'runtestscpp' fails with things like:
|
||||||
;;
|
;;
|
||||||
;; ld: Dwarf Error: found dwarf version '3789', this reader only handles version 2 and 3 information.
|
;; ld: Dwarf Error: found dwarf version '3789', this reader only handles version 2 and 3 information.
|
||||||
;;
|
;;
|
||||||
;; Skip tests altogether.
|
;; Skip tests altogether.
|
||||||
(substitute-keyword-arguments (package-arguments expat)
|
`(#:implicit-inputs? #f
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
|
||||||
|
,@(substitute-keyword-arguments (package-arguments expat)
|
||||||
((#:configure-flags flags ''())
|
((#:configure-flags flags ''())
|
||||||
;; Since we're not passing the right -Wl,-rpath flags, build the
|
;; Since we're not passing the right -Wl,-rpath flags, build the
|
||||||
;; static library to avoid RUNPATH validation failure.
|
;; static library to avoid RUNPATH validation failure.
|
||||||
`(cons "--disable-shared" ,flags))
|
`(cons "--disable-shared" ,flags))
|
||||||
((#:tests? _ #f) #f)))))
|
((#:tests? _ #f) #f))))))
|
||||||
|
|
||||||
(define python-boot0
|
(define python-boot0
|
||||||
(let ((python (package
|
(package
|
||||||
(inherit python-minimal)
|
(inherit python-minimal)
|
||||||
;; We cannot use Python 3.7 and later here, because they require
|
;; We cannot use Python 3.7 and later here, because they require
|
||||||
;; pthreads, which is missing on non-x86 platforms at this stage.
|
;; pthreads, which is missing on non-x86 platforms at this stage.
|
||||||
;; Python 3.6 technically supports being built without threading
|
;; Python 3.6 technically supports being built without threading
|
||||||
;; support, but requires additional patches.
|
;; support, but requires additional patches.
|
||||||
(version "3.5.7")
|
(version "3.5.7")
|
||||||
(source (origin
|
(source (bootstrap-origin
|
||||||
|
(origin
|
||||||
(inherit (package-source python))
|
(inherit (package-source python))
|
||||||
(uri (string-append "https://www.python.org/ftp/python/"
|
(uri (string-append "https://www.python.org/ftp/python/"
|
||||||
version "/Python-" version ".tar.xz"))
|
version "/Python-" version ".tar.xz"))
|
||||||
(patches '())
|
(patches '())
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1p67pnp2ca5przx2s45r8m55dcn6f5hsm0l4s1zp7mglkf4r4n18"))))
|
"1p67pnp2ca5przx2s45r8m55dcn6f5hsm0l4s1zp7mglkf4r4n18")))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
|
`(,@(%boot0-inputs)
|
||||||
|
("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
|
||||||
(native-inputs '()) ;and pkg-config
|
(native-inputs '()) ;and pkg-config
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments
|
`(#:implicit-inputs? #f
|
||||||
python-minimal)
|
#:guile ,%bootstrap-guile
|
||||||
|
|
||||||
|
,@(substitute-keyword-arguments (package-arguments python-minimal)
|
||||||
;; Disable features that cannot be built at this stage.
|
;; Disable features that cannot be built at this stage.
|
||||||
((#:configure-flags _ ''())
|
((#:configure-flags _ ''())
|
||||||
`(list "--without-ensurepip"
|
`(list "--without-ensurepip"
|
||||||
|
@ -1915,10 +1941,6 @@ the bootstrap environment."
|
||||||
#t))
|
#t))
|
||||||
(delete 'set-TZDIR)))
|
(delete 'set-TZDIR)))
|
||||||
((#:tests? _ #f) #f))))))
|
((#:tests? _ #f) #f))))))
|
||||||
(package-with-bootstrap-guile
|
|
||||||
(package-with-explicit-inputs python %boot0-inputs
|
|
||||||
(current-source-location)
|
|
||||||
#: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
|
||||||
|
@ -1942,9 +1964,10 @@ the bootstrap environment."
|
||||||
;; store path has no dependencies. Actually, the really-final libc is
|
;; store path has no dependencies. Actually, the really-final libc is
|
||||||
;; built just below; the only difference is that this one uses the
|
;; built just below; the only difference is that this one uses the
|
||||||
;; bootstrap Bash.
|
;; bootstrap Bash.
|
||||||
(package-with-bootstrap-guile
|
(package
|
||||||
(package (inherit glibc)
|
(inherit glibc)
|
||||||
(name "glibc-intermediate")
|
(name "glibc-intermediate")
|
||||||
|
(source (bootstrap-origin (package-source glibc)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
#:implicit-inputs? #f
|
#:implicit-inputs? #f
|
||||||
|
@ -1986,7 +2009,7 @@ the bootstrap environment."
|
||||||
("perl" ,perl-boot0)
|
("perl" ,perl-boot0)
|
||||||
("python" ,python-boot0)))
|
("python" ,python-boot0)))
|
||||||
(inputs
|
(inputs
|
||||||
`(;; The boot inputs. That includes the bootstrap libc. We don't want
|
`( ;; The boot inputs. That includes the bootstrap libc. We don't want
|
||||||
;; it in $CPATH, hence the 'pre-configure' phase above.
|
;; it in $CPATH, hence the 'pre-configure' phase above.
|
||||||
,@(%boot1-inputs)
|
,@(%boot1-inputs)
|
||||||
|
|
||||||
|
@ -2000,7 +2023,7 @@ the bootstrap environment."
|
||||||
|
|
||||||
;; Here, we use the bootstrap Bash, which is not satisfactory
|
;; Here, we use the bootstrap Bash, which is not satisfactory
|
||||||
;; because we don't want to depend on bootstrap tools.
|
;; because we don't want to depend on bootstrap tools.
|
||||||
("static-bash" ,@(assoc-ref (%boot0-inputs) "bash")))))))
|
("static-bash" ,@(assoc-ref (%boot0-inputs) "bash"))))))
|
||||||
|
|
||||||
(define (cross-gcc-wrapper gcc binutils glibc bash)
|
(define (cross-gcc-wrapper gcc binutils glibc bash)
|
||||||
"Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
|
"Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
|
||||||
|
@ -2064,13 +2087,19 @@ 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 ((bash (package
|
(package
|
||||||
(inherit static-bash)
|
(inherit static-bash)
|
||||||
|
(source (bootstrap-origin (package-source static-bash)))
|
||||||
|
(inputs `(("gcc" ,(gcc-boot0-intermediate-wrapped))
|
||||||
|
("libc" ,glibc-final-with-bootstrap-bash)
|
||||||
|
("libc:static" ,glibc-final-with-bootstrap-bash "static")
|
||||||
|
,@(fold alist-delete (%boot1-inputs)
|
||||||
|
'("gcc" "libc"))))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments
|
`(#:implicit-inputs? #f
|
||||||
(package-arguments static-bash)
|
#:guile ,%bootstrap-guile
|
||||||
((#:guile _ #f)
|
|
||||||
'%bootstrap-guile)
|
,@(substitute-keyword-arguments (package-arguments static-bash)
|
||||||
((#:configure-flags flags '())
|
((#:configure-flags flags '())
|
||||||
;; Add a '-L' flag so that the pseudo-cross-ld of
|
;; Add a '-L' flag so that the pseudo-cross-ld of
|
||||||
;; BINUTILS-BOOT0 can find libc.a.
|
;; BINUTILS-BOOT0 can find libc.a.
|
||||||
|
@ -2079,22 +2108,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(assoc-ref %build-inputs
|
(assoc-ref %build-inputs
|
||||||
"libc:static")
|
"libc:static")
|
||||||
"/lib")))))))))
|
"/lib")))))))))
|
||||||
(package-with-bootstrap-guile
|
|
||||||
(package-with-explicit-inputs
|
|
||||||
bash
|
|
||||||
(lambda _
|
|
||||||
`(("gcc" ,(gcc-boot0-intermediate-wrapped))
|
|
||||||
("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.
|
||||||
(let ((gettext-minimal
|
(package
|
||||||
(package (inherit gettext-minimal)
|
(inherit gettext-minimal)
|
||||||
(name "gettext-boot0")
|
(name "gettext-boot0")
|
||||||
;; Newer versions of GNU gettext depends on libxml2 and ncurses. To
|
;; Newer versions of GNU gettext depends on libxml2 and ncurses. To
|
||||||
;; simplify the dependency chain, we stick to this version here.
|
;; simplify the dependency chain, we stick to this version here.
|
||||||
|
@ -2106,9 +2124,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0hsw28f9q9xaggjlsdp2qmbp2rbd1mp0njzan2ld9kiqwkq2m57z"))))
|
"0hsw28f9q9xaggjlsdp2qmbp2rbd1mp0njzan2ld9kiqwkq2m57z"))))
|
||||||
(inputs '()) ;zero dependencies
|
(inputs (%boot1-inputs)) ;zero dependencies
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f
|
`(#:implicit-inputs? #f
|
||||||
|
#:guile ,%bootstrap-guile
|
||||||
|
#:tests? #f
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases (modify-phases %standard-phases
|
||||||
;; Build only the tools.
|
;; Build only the tools.
|
||||||
(add-after 'unpack 'chdir
|
(add-after 'unpack 'chdir
|
||||||
|
@ -2122,19 +2142,15 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(substitute* "tests/Makefile.in"
|
(substitute* "tests/Makefile.in"
|
||||||
(("^PROGRAMS =.*$")
|
(("^PROGRAMS =.*$")
|
||||||
"PROGRAMS =\n"))
|
"PROGRAMS =\n"))
|
||||||
#t))))))))
|
#t)))))))
|
||||||
(package-with-bootstrap-guile
|
|
||||||
(package-with-explicit-inputs gettext-minimal
|
|
||||||
%boot1-inputs
|
|
||||||
(current-source-location)
|
|
||||||
#:guile %bootstrap-guile))))
|
|
||||||
|
|
||||||
(define glibc-final
|
(define glibc-final
|
||||||
;; The final glibc, which embeds the statically-linked Bash built above.
|
;; The final glibc, which embeds the statically-linked Bash built above.
|
||||||
;; Use 'package/inherit' so we get the 'replacement' of 'glibc', if any.
|
;; Use 'package/inherit' so we get the 'replacement' of 'glibc', if any.
|
||||||
(let ((glibc (package-with-bootstrap-guile glibc)))
|
(package/inherit
|
||||||
(package/inherit glibc
|
glibc
|
||||||
(name "glibc")
|
(name "glibc")
|
||||||
|
(source (bootstrap-origin (package-source glibc)))
|
||||||
(inputs `(("static-bash" ,static-bash-for-glibc)
|
(inputs `(("static-bash" ,static-bash-for-glibc)
|
||||||
,@(alist-delete
|
,@(alist-delete
|
||||||
"static-bash"
|
"static-bash"
|
||||||
|
@ -2156,7 +2172,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
static-bash-for-glibc
|
static-bash-for-glibc
|
||||||
(package-outputs glibc-final-with-bootstrap-bash))
|
(package-outputs glibc-final-with-bootstrap-bash))
|
||||||
|
|
||||||
,@(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
|
||||||
|
@ -2172,21 +2188,23 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
,@(fold alist-delete (%boot1-inputs) '("libc" "gcc" "linux-libre-headers"))))
|
,@(fold alist-delete (%boot1-inputs) '("libc" "gcc" "linux-libre-headers"))))
|
||||||
|
|
||||||
(define binutils-final
|
(define binutils-final
|
||||||
(package-with-bootstrap-guile
|
(package
|
||||||
(package (inherit binutils)
|
(inherit binutils)
|
||||||
|
(source (bootstrap-origin (package-source binutils)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
#:implicit-inputs? #f
|
#:implicit-inputs? #f
|
||||||
#:allowed-references ("out" ,glibc-final)
|
#:allowed-references ("out" ,glibc-final)
|
||||||
,@(package-arguments binutils)))
|
,@(package-arguments binutils)))
|
||||||
(inputs (%boot2-inputs)))))
|
(inputs (%boot2-inputs))))
|
||||||
|
|
||||||
(define libstdc++
|
(define libstdc++
|
||||||
;; Intermediate libstdc++ that will allow us to build the final GCC
|
;; Intermediate libstdc++ that will allow us to build the final GCC
|
||||||
;; (remember that GCC-BOOT0 cannot build libstdc++.)
|
;; (remember that GCC-BOOT0 cannot build libstdc++.)
|
||||||
(let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc))))
|
(let ((lib (make-libstdc++ gcc)))
|
||||||
(package
|
(package
|
||||||
(inherit lib)
|
(inherit lib)
|
||||||
|
(source (bootstrap-origin (package-source lib)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
#:implicit-inputs? #f
|
#:implicit-inputs? #f
|
||||||
|
@ -2211,7 +2229,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
|
|
||||||
(define zlib-final
|
(define zlib-final
|
||||||
;; Zlib used by GCC-FINAL.
|
;; Zlib used by GCC-FINAL.
|
||||||
(package-with-bootstrap-guile
|
|
||||||
(package
|
(package
|
||||||
(inherit zlib)
|
(inherit zlib)
|
||||||
(arguments
|
(arguments
|
||||||
|
@ -2219,7 +2236,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
#:implicit-inputs? #f
|
#:implicit-inputs? #f
|
||||||
#:allowed-references ("out" ,glibc-final)
|
#:allowed-references ("out" ,glibc-final)
|
||||||
,@(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.
|
||||||
|
@ -2328,17 +2345,18 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
;; Link with `-static-libgcc' to make sure we don't retain a reference
|
;; Link with `-static-libgcc' to make sure we don't retain a reference
|
||||||
;; to the bootstrap GCC. Use "bash-minimal" to avoid an extra dependency
|
;; to the bootstrap GCC. Use "bash-minimal" to avoid an extra dependency
|
||||||
;; on Readline and ncurses.
|
;; on Readline and ncurses.
|
||||||
(let ((bash (package
|
(let ((bash (static-libgcc-package bash-minimal)))
|
||||||
(inherit bash-minimal)
|
(package
|
||||||
|
(inherit bash)
|
||||||
|
(source (bootstrap-origin (package-source bash)))
|
||||||
|
(inputs (%boot3-inputs))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:disallowed-references
|
`(#:implicit-inputs? #f
|
||||||
,(assoc-ref (%boot3-inputs) "coreutils&co")
|
#:guile ,%bootstrap-guile
|
||||||
,@(package-arguments bash-minimal))))))
|
|
||||||
(package-with-bootstrap-guile
|
#:disallowed-references ,(assoc-ref (%boot3-inputs) "coreutils&co")
|
||||||
(package-with-explicit-inputs (static-libgcc-package bash)
|
|
||||||
%boot3-inputs
|
,@(package-arguments bash))))))
|
||||||
(current-source-location)
|
|
||||||
#:guile %bootstrap-guile))))
|
|
||||||
|
|
||||||
(define (%boot4-inputs)
|
(define (%boot4-inputs)
|
||||||
;; Now use the final Bash.
|
;; Now use the final Bash.
|
||||||
|
|
Reference in a new issue