* guix/packages.scm (%derivation-cache): Pass an initial size of 100.
(cache): Use `hashq-set!', and use a SYSTEM/DRV pair as the value.
(cached-derivation): Update accordingly.
* tests/builders.scm (%bootstrap-inputs, %bootstrap-guile): New
variables.
("gnu-build"): Use them, by setting `#:implicit-inputs? #f' and `#:guile'.
* tests/packages.scm (%bootstrap-inputs, %bootstrap-guile): New
variables.
("trivial"): Pass `#:guile %bootstrap-guile'.
("GNU Hello"): Use `package-with-explicit-inputs' to use
%BOOTSTRAP-GUILE and %BOOTSTRAP-INPUTS.
* guix/build-system/gnu.scm (package-with-explicit-inputs): New `guile'
keyword parameter. Add it to P's arguments, and pass it in recursive
calls.
(gnu-build): New `guile' keyword parameter; new `guile-for-build'
variable. Pass it as the `#:guile-for-build' parameter of
`build-expression->derivation'.
* guix/build-system/trivial.scm (trivial-build): Likewise.
* guix/build/gnu-build-system.scm (%parallel-job-count): New variable.
(build, check): Use it instead of $NIX_BUILD_CORES.
* guix-build.in (guix-build): Default to 0 for the #:build-cores option.
* distro/ld-wrapper.scm: New file.
* Makefile.am (MODULES): Add it.
* distro/base.scm (ld-wrapper-boot3): New variable.
(%boot3-inputs): Add LD-WRAPPER-BOOT3.
(bash-final, guile-final, ld-wrapper): New final.
(%final-inputs): Use BASH-FINAL; add LD-WRAPPER.
(gcc-4.7): Remove the `-rpath' trick from the `lib' spec string.
* distro/base.scm (gcc-4.7): Patch `LIB_SPEC' to add `-rpath' for each
`-L'. Spec string suggested by Marc Glisse <marc.glisse@inria.fr>.
(libtool): Add `libtool-skip-tests.patch'.
* distro/patches/libtool-skip-tests.patch: New file.
* Makefile.am (dist_patch_DATA): Add it.
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.