gnu: Remove unnecessary uses of 'package-with-bootstrap-guile'.

This reduces the object graph returned by:

  guix graph -e '(@@ (gnu packages commencement) glibc-final-with-bootstrap-bash)

from 333 nodes (1542 edges) to 148 nodes (886 edges).

This improves 'package-derivation' memoization and, consequently, the
'add-data-to-store' cache shown by:

  GUIX_PROFILING=add-data-to-store-cache guix build coreutils -nd

goes from 10948 lookups to 8935 lookups.

* gnu/packages/commencement.scm (mes-boot): Remove call to
'package-with-bootstrap-guile'.  Call 'bootstrap-origin' on the source
of NYACC-0.86.
(tcc-boot0): Likewise.
(tcc-boot): Remove call to 'package-with-bootstrap-guile' and call
'bootstrap-origin' on its source.
(make-mesboot0): Remove call to 'package-with-bootstrap-guile'.
(diffutils-mesboot): Likewise.
(binutils-mesboot0): Likewise, and call 'bootstrap-origin' for its
source.
(gcc-core-mesboot): Likewise.
(mesboot-headers): Remove call to 'package-with-bootstrap-guile'.
(glibc-mesboot0): Likewise, and call 'bootstrap-origin' for its source.
(gcc-mesboot0): Remove call to 'package-with-bootstrap-guile'.
(binutils-mesboot): Likewise.
(make-mesboot): Likewise.
(gcc-mesboot1): Likewise, and call 'bootstrap-origin' for its source.
(gcc-mesboot1-wrapper): Remove call to 'package-with-bootstrap-guile'.
(glibc-headers-mesboot): Likewise, and call 'bootstrap-origin' for its
source.
(glibc-mesboot): Remove call to 'package-with-bootstrap-guile'.
(gcc-mesboot): Likewise, and call to 'bootstrap-origin' for its source.
(gcc-mesboot-wrapper): Remove call to 'package-with-bootstrap-guile'.
(m4-mesboot): Likewise.
(gnu-make-boot0): Likewise, and call 'bootstrap-origin' for its source.
This commit is contained in:
Ludovic Courtès 2019-10-11 17:23:13 +02:00
parent 5b811ddc67
commit 9a45a24f7f
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -85,7 +85,6 @@ (define-module (gnu packages commencement)
;;; Code:
(define mes-boot
(package-with-bootstrap-guile
(package
(inherit mes)
(name "mes-boot")
@ -101,7 +100,8 @@ (define mes-boot
(propagated-inputs '())
(native-inputs
`(("mescc-tools" ,%bootstrap-mescc-tools)
("nyacc-source" ,(package-source nyacc-0.86))
("nyacc-source" ,(bootstrap-origin
(package-source nyacc-0.86)))
("coreutils" , %bootstrap-coreutils&co)
("bootstrap-mes" ,%bootstrap-mes)))
@ -158,7 +158,7 @@ (define mes-boot
(files '("share/mes/include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("share/mes/lib"))))))))
(files '("share/mes/lib")))))))
(define tcc-boot0
;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 11
@ -170,7 +170,6 @@ (define tcc-boot0
(let ((version "0.9.26")
(revision "6")
(commit "c004e9a34fb026bb44d211ab98bb768e79900eef"))
(package-with-bootstrap-guile
(package
(inherit tcc)
(name "tcc-boot0")
@ -190,7 +189,8 @@ (define tcc-boot0
(native-inputs
`(("mes" ,mes-boot)
("mescc-tools" ,%bootstrap-mescc-tools)
("nyacc-source" ,(package-source nyacc-0.86))
("nyacc-source" ,(bootstrap-origin
(package-source nyacc-0.86)))
("coreutils" , %bootstrap-coreutils&co)
("bootstrap-mes" ,%bootstrap-mes)))
@ -274,17 +274,17 @@ (define tcc-boot0
(files '("include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib")))))))))
(files '("lib"))))))))
(define tcc-boot
(package-with-bootstrap-guile
(package
(inherit tcc-boot0)
(name "tcc-boot")
(version "0.9.27")
(source (origin
(source (bootstrap-origin
(origin
(inherit (package-source tcc))
(patches (search-patches "tcc-boot-0.9.27.patch"))))
(patches (search-patches "tcc-boot-0.9.27.patch")))))
(build-system gnu-build-system)
(inputs '())
(propagated-inputs '())
@ -296,9 +296,11 @@ (define tcc-boot
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
#:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2
; binaries, tcc-boot also comes with
; MesCC/M1/hex2-built binaries
;; Binutils' 'strip' b0rkes MesCC/M1/hex2 binaries, tcc-boot also comes
;; with MesCC/M1/hex2-built binaries.
#:strip-binaries? #f
#:phases
(modify-phases %standard-phases
(replace 'configure
@ -344,7 +346,8 @@ (define tcc-boot
"-D" "CONFIG_USE_LIBGCC=1"
"-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
"-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
"-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
"-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out
"/lib:{B}/lib:.\"")
"-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"")
"-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:.\"")
"-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\"" tcc "/include" ":/include:{B}/include\"")
@ -372,10 +375,9 @@ (define tcc-boot
(copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
(delete-file (string-append out "/lib/tcc/libtcc1.a"))
(copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a"))
#t)))))))))
#t))))))))
(define make-mesboot0
(package-with-bootstrap-guile
(package
(inherit gnu-make)
(name "make-mesboot0")
@ -420,10 +422,9 @@ (define make-mesboot0
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "make" bin)
#t)))))))))
#t))))))))
(define diffutils-mesboot
(package-with-bootstrap-guile
(package
(inherit diffutils)
(name "diffutils-mesboot")
@ -465,22 +466,22 @@ (define diffutils-mesboot
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile.in"
(("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))
#t))))))))
#t)))))))
(define binutils-mesboot0
(package-with-bootstrap-guile
(package
(inherit binutils)
(name "binutils-mesboot0")
(version "2.20.1a")
(source (origin
(source (bootstrap-origin
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(patches (search-patches "binutils-boot-2.20.1a.patch"))
(sha256
(base32
"0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi"))))
"0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
(inputs '())
(propagated-inputs '())
(native-inputs `(("tcc" ,tcc-boot)
@ -511,7 +512,7 @@ (define binutils-mesboot0
"--disable-werror"
"--build=i686-unknown-linux-gnu"
"--host=i686-unknown-linux-gnu"
"--with-sysroot=/")))))))
"--with-sysroot=/"))))))
(define gcc-core-mesboot
;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
@ -519,12 +520,12 @@ (define gcc-core-mesboot
;; library, such as dir.h/struct DIR/readdir, locales, signals... Also,
;; with gcc-2.95.3, binutils-boot-2.20.1a and glibc-2.2.5 we found a GNU
;; toolchain triplet "that works".
(package-with-bootstrap-guile
(package
(inherit gcc)
(name "gcc-core-mesboot")
(version "2.95.3")
(source (origin
(source (bootstrap-origin
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
version
@ -532,7 +533,7 @@ (define gcc-core-mesboot
(patches (search-patches "gcc-boot-2.95.3.patch"))
(sha256
(base32
"1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
"1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an")))))
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
@ -638,10 +639,9 @@ (define gcc-core-mesboot
(files '("include" "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib"))))))))
(files '("lib")))))))
(define mesboot-headers
(package-with-bootstrap-guile
(package
(inherit mes-boot)
(name "mesboot-headers")
@ -676,18 +676,18 @@ (define mesboot-headers
;; the typical /usr/include headers on an FHS system.
(list (search-path-specification
(variable "C_INCLUDE_PATH")
(files '("include"))))))))
(files '("include")))))))
(define glibc-mesboot0
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
;; gcc.
(package-with-bootstrap-guile
(package
(inherit glibc)
(name "glibc-mesboot0")
(version "2.2.5")
(source (origin
(source (bootstrap-origin
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-"
version
@ -695,7 +695,7 @@ (define glibc-mesboot0
(patches (search-patches "glibc-boot-2.2.5.patch"))
(sha256
(base32
"1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
"1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q")))))
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
@ -773,10 +773,9 @@ (define glibc-mesboot0
(files '("include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib"))))))))
(files '("lib")))))))
(define gcc-mesboot0
(package-with-bootstrap-guile
(package
(inherit gcc-core-mesboot)
(name "gcc-mesboot0")
@ -841,10 +840,9 @@ (define gcc-mesboot0
`(let ((gcc (assoc-ref %build-inputs "gcc")))
`("RANLIB=true"
,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include")
"LANGUAGES=c"))))))))
"LANGUAGES=c")))))))
(define binutils-mesboot
(package-with-bootstrap-guile
(package
(inherit binutils-mesboot0)
(name "binutils-mesboot")
@ -865,10 +863,9 @@ (define binutils-mesboot
"--disable-werror"
"--build=i686-unknown-linux-gnu"
"--host=i686-unknown-linux-gnu"
"--with-sysroot=/")))))))
"--with-sysroot=/"))))))
(define make-mesboot
(package-with-bootstrap-guile
(package
(inherit make-mesboot0)
(name "make-mesboot")
@ -899,7 +896,7 @@ (define make-mesboot
(add-before 'configure 'setenv
(lambda _
(setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
#t)))))))))
#t))))))))
(define gmp-boot
(package
@ -936,13 +933,13 @@ (define mpc-boot
"1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))))
(define gcc-mesboot1
(package-with-bootstrap-guile
(package
(inherit gcc-mesboot0)
(name "gcc-mesboot1")
(version "4.7.4")
(source (origin (inherit (package-source gcc-4.7))
(patches (search-patches "gcc-boot-4.7.4.patch"))))
(source (bootstrap-origin
(origin (inherit (package-source gcc-4.7))
(patches (search-patches "gcc-boot-4.7.4.patch")))))
(inputs `(("gmp-source" ,(package-source gmp-boot))
("mpfr-source" ,(package-source mpfr-boot))
("mpc-source" ,(package-source mpc-boot))))
@ -1051,13 +1048,12 @@ (define gcc-mesboot1
"--disable-libstdcxx-pch"
;; for libcpp ...
"--disable-build-with-cxx"))))))))
"--disable-build-with-cxx")))))))
(define gcc-mesboot1-wrapper
;; We need this so gcc-mesboot1 can be used to create shared binaries that
;; have the correct interpreter, otherwise configuring gcc-mesboot using
;; --enable-shared will fail.
(package-with-bootstrap-guile
(package
(inherit gcc-mesboot1)
(name "gcc-mesboot1-wrapper")
@ -1109,15 +1105,15 @@ (define gcc-mesboot1-wrapper
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(program (string-append bin "/gcc")))
(invoke program "--help"))))))))))
(invoke program "--help")))))))))
(define glibc-headers-mesboot
(package-with-bootstrap-guile
(package
(inherit glibc-mesboot0)
(name "glibc-headers-mesboot")
(version "2.16.0")
(source (origin
(source (bootstrap-origin
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-"
version
@ -1126,7 +1122,7 @@ (define glibc-headers-mesboot
"glibc-bootstrap-system-2.16.0.patch"))
(sha256
(base32
"0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7"))))
"0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7")))))
(native-inputs `(("binutils" ,binutils-mesboot)
("libc" ,glibc-mesboot0)
("gcc" ,gcc-mesboot1)
@ -1214,10 +1210,9 @@ (define glibc-headers-mesboot
(substitute* "../Makeconfig"
(("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL"))))
(substitute* "../elf/Makefile"
(("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL")))))))))))))
(("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL"))))))))))))
(define glibc-mesboot
(package-with-bootstrap-guile
(package
(inherit glibc-headers-mesboot)
(name "glibc-mesboot")
@ -1262,15 +1257,14 @@ (define glibc-mesboot
(files '("include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib"))))))))
(files '("lib")))))))
(define gcc-mesboot
(package-with-bootstrap-guile
(package
(inherit gcc-mesboot1)
(name "gcc-mesboot")
(version "4.9.4")
(source (package-source gcc-4.9))
(source (bootstrap-origin (package-source gcc-4.9)))
(native-inputs `(("binutils" ,binutils-mesboot)
("gcc-wrapper" ,gcc-mesboot1-wrapper)
("gcc" ,gcc-mesboot1)
@ -1349,12 +1343,11 @@ (define gcc-mesboot
(format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
(format (current-error-port) "CPLUS_INCLUDE_PATH=~a\n" (getenv "CPLUS_INCLUDE_PATH"))
(format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
#t)))))))))))
#t))))))))))
(define gcc-mesboot-wrapper
;; We need this so gcc-mesboot can be used to create shared binaries that
;; have the correct interpreter and runpath to libc.
(package-with-bootstrap-guile
(package
(inherit gcc-mesboot1-wrapper)
(name "gcc-mesboot-wrapper")
@ -1363,10 +1356,9 @@ (define gcc-mesboot-wrapper
(inputs '())
(native-inputs `(("bash" ,%bootstrap-coreutils&co)
("libc" ,glibc-mesboot)
("gcc" ,gcc-mesboot))))))
("gcc" ,gcc-mesboot)))))
(define m4-mesboot
(package-with-bootstrap-guile
(package
(inherit m4)
(name "m4-mesboot")
@ -1392,7 +1384,7 @@ (define m4-mesboot
"/bin/sh"))
(setenv "CC" "tcc -static")
(setenv "CPP" "tcc -E")
(invoke "./configure" (string-append "--prefix=" out)))))))))))
(invoke "./configure" (string-append "--prefix=" out))))))))))
(define (%bootstrap-inputs+toolchain)
;; The traditional bootstrap-inputs. For the i686-linux Reduced Binary Seed
@ -1409,8 +1401,9 @@ (define (%bootstrap-inputs+toolchain)
(%bootstrap-inputs))))
(define gnu-make-boot0
(package-with-bootstrap-guile
(package (inherit gnu-make)
(package
(inherit gnu-make)
(source (bootstrap-origin (package-source gnu-make)))
(name "make-boot0")
(arguments
`(#:guile ,%bootstrap-guile
@ -1429,7 +1422,7 @@ (define gnu-make-boot0
(install-file "make" bin)
#t))))))))
(native-inputs '()) ; no need for 'pkg-config'
(inputs (%bootstrap-inputs+toolchain)))))
(inputs (%bootstrap-inputs+toolchain))))
(define diffutils-boot0
(package-with-bootstrap-guile