Improved support for building 32-bit binaries on x86_64-linux.

* glibc_multi: a wrapper that combines the 32-bit and 64-bit Glibcs.
  This is necessary so that 64-bit GCC can find gnu/stubs-32.h and the
  32-bit Glibc libraries.

  To build glibc_multi on x86_64-linux, you still need either the
  i686-linux Glibc derivation from a channel, or to have configured
  Nix with support for forwarding the build to a i686-linux machine.
  In the future this may become unnecessary by providing a prebuilt
  binary of 32-bit Glibc somewhere (like the binaries used in the
  stdenvLinux bootstrap).

* With glibc_multi, it becomes possible to build gcc with multilib
  support (i.e. it builds 32-bit and 64-bit versions of libgcc,
  libstdc++, etc.).

svn path=/nixpkgs/trunk/; revision=12203
This commit is contained in:
Eelco Dolstra
2008-06-27 18:26:19 +00:00
parent f960020e95
commit 48ac8018ca
2 changed files with 36 additions and 6 deletions

View File

@@ -5,6 +5,7 @@
, texinfo ? null
, gmp, mpfr
, bison ? null, flex ? null
, enableMultilib ? false
}:
assert langC;
@@ -43,6 +44,7 @@ stdenv.mkDerivation {
++ optionals langTreelang [bison flex];
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
--disable-libstdcxx-pch
--with-system-zlib
--enable-languages=${
@@ -60,8 +62,8 @@ stdenv.mkDerivation {
NIX_EXTRA_LDFLAGS = if staticCompiler then "-static" else "";
inherit gmp mpfr;
passthru = { inherit langC langCC langFortran langTreelang; };
passthru = { inherit langC langCC langFortran langTreelang enableMultilib; };
meta = {
homepage = "http://gcc.gnu.org/";