[Nix-dev] Update on distro bootstrapping with Guix

Ludovic Courtès ludo at gnu.org
Fri Oct 5 18:05:00 CEST 2012


Hello!

The Guix-based distro [0,1] now has a bootstrapped “standard
environment” [2], similar to ‘stdenvLinux’ in Nixpkgs.  The initial set
of binaries is still taken from Nixpkgs, though (IOW, there’s no
equivalent to ‘make-bootstrap-tools.nix’ yet.)

The distro uses Glibc 2.16.0 and GCC 4.7.2.  Bootstrapping is different
From that of ‘stdenvLinux’, and was inspired by Linux From Scratch:

  • first, a cross toolchain for the current system is built;

  • it is then used to “cross-build” the final glibc; that libc is
    guaranteed to not hold any reference to the initial toolchain;

  • then the final, native Binutils and GCC are natively built, using
    the cross toolchain disguised as a native toolchain (see
    ‘gcc-boot0-wrapped’ in ‘base.scm’);

  • finally, an ‘ld’ wrapper [3] similar to that of Nixpkgs is built on
    top of the final Binutils (attempts to avoid it entirely failed.)

There’s no GCC wrapper.  Instead, GCC’s default spec strings are
modified to match our file system layout.

GMP/MPFR/MPC as built as part of the GCC build process, instead of being
built separately, which is an appreciable simplification.

Another difference from Nixpkgs is that the initial set of bootstrap
tools is reduced: GNU Make, Findutils, and Diffutils are lacking, and
get built early.  Conversely, Guile 2.0 is part of that initial set,
since it is used to run build scripts.


Now the next step will be to build the bootstrap binaries with Guix.

If you want to hack on a distro not as mainstream as NixOS, your help is
welcome!  :-)

Thanks,
Ludo’.

[0] https://gitorious.org/guix
[1] http://lists.gnu.org/archive/html/gnu-system-discuss/2012-07/msg00000.html
[2] https://gitorious.org/guix/guix/blobs/master/distro/packages/base.scm
    See under “Bootstrap packages.”
[3] https://gitorious.org/guix/guix/blobs/master/distro/packages/ld-wrapper.scm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20121005/9c8950f2/attachment.bin 


More information about the nix-dev mailing list