This allows the final toolchain to be completely independent of
%BOOTSTRAP-INPUTS.
* distro/base.scm (glibc-dynamic-linker): New procedure.
(gcc-4.7): Remove #:path-exclusions argument. Check whether LIBC is
#f before using it.
(glibc): Remove "libc_cv_as_needed" hack. Patch `Makeconfig' to
remove `-lgcc_s'.
(nix-system->gnu-triplet, boot-triplet): New variables.
(binutils-boot0): Turn into a cross-Binutils targeting (boot-triplet
SYSTEM).
(gcc-boot0): Likewise. Add configure options to make a smaller
build. Remove "binutils-source" from the input, and use
BINUTILS-BOOT0 instead.
(glibc-final): Cross-build using GCC-BOOT0 and BINUTILS-BOOT0.
(gcc-boot0-wrapped): New variable.
(%boot2-inputs): Use it.
(m4-boot2, gmp-boot2, mpfr-boot2, mpc-boot2): Remove.
(binutils-final): New variable.
(gcc-final): Turn into a joint build with GMP/MPFR/MPC. Use
BINUTILS-FINAL.
(%boot3-inputs): Adjust accordingly.
(%boot4-inputs): Remove.
(%final-inputs): Use %BOOT3-INPUTS.
* guix/build-system/trivial.scm: New file.
* Makefile.am (MODULES): Add it.
* tests/packages.scm ("trivial"): New test.
* guix/packages.scm (package-derivation): Allow SOURCE to be #f.
* distro/base.scm (%bootstrap-inputs): Remove GMP, MPFR, and MPC.
(substitute-keyword-arguments): New macro.
(gcc-boot0): Add dependency on the Binutils, GMP, MPFR, and MPC
tarballs. Add a `unpack-binutils&co' phase to unpack them and symlink
them so they get built, and to patch errors in `configure'.
(glibc-final): Use `substitute-keyword-arguments' instead of a loop.
(gcc-final): Inherit from GCC-4.7 instead of GCC-BOOT0.
This is a first step towards bootstrapping from a set of pre-built,
statically-linked binaries.
* guix/build-system/gnu.scm (package-with-explicit-inputs,
standard-inputs): New procedure.
(%store): New variable.
(%standard-inputs): Remove.
(gnu-build): New `implicit-inputs?' keyword parameter. Use it to
choose whether to use `(standard-inputs SYSTEM)' or the empty list.
* distro/base.scm (guile-2.0): Remove dependency on XZ, which is now
implicit.
(%bootstrap-inputs, gcc-boot0, binutils-boot0, linux-headers-boot0,
%boot1-inputs, glibc-final, %boot2-inputs, m4-boot2, gmp-boot2,
mpfr-boot2, mpc-boot2, %boot3-inputs, gcc-final, %boot4-inputs,
%final-inputs): New variables.
* guix/packages.scm (transitive-inputs): New procedure.
(package-transitive-inputs): Rewrite in terms of `transitive-inputs'.
(package-transitive-propagated-inputs): New procedure.
* guix/build/utils.scm (substitute): Do not pass the OUT to PROC; use
`list-matches' instead of `regexp-exec' and pass a list of matches to
PROC. Expect PROC to return a string, and output that. Fold over
RX+PROC in order. Use `(read-line p 'concat)' to include the trailing
delimiter in LINE.
(substitute*): Produce code to iterate over the matches, and return a
string, which includes anything from the original line that's in
between matches.
* distro/base.scm (gcc-4.7, glibc): Adjust accordingly: remove use
of (ice-9 regex) and `regexp-substitute/global'; return a string.
* guix/derivations.scm (%guile-for-build): Use `nixpkgs-derivation*'
instead of `nixpkgs-derivation'.
(build-expression->derivation): New `guile-for-build' keyword
parameter. Use it.
* guix/build/gnu-build-system.scm (set-paths): Add new `path-exclusions'
parameter; honor it.
* guix/build-system/gnu.scm (gnu-build): New `path-exclusions' keyword
parameter; pass it to BUILDER.
* distro/base.scm (gcc-4.7): Exclude "libc" from $LIBRARY_PATH.
* guix/build/gnu-build-system.scm (strip): New procedure.
(%standard-phases): Add it.
* guix/build-system/gnu.scm (gnu-build): New `strip-binaries?',
`strip-flags', and `strip-directories' keyword parameters. Pass them
to BUILDER.