Trying to bootstrap gcc 4.5 with ppl, so it does not depend on libstdc++ from the boostrap-tools.
svn path=/nixpkgs/branches/stdenv-updates/; revision=22947
This commit is contained in:
parent
b17d1d7d07
commit
e0a11f532b
|
@ -196,6 +196,11 @@ stdenv.mkDerivation ({
|
||||||
++ (optionals langVhdl [gnat])
|
++ (optionals langVhdl [gnat])
|
||||||
;
|
;
|
||||||
|
|
||||||
|
configureFlagsArray = stdenv.lib.optionals
|
||||||
|
(ppl != null && ppl.dontDisableStatic == true)
|
||||||
|
[ "--with-host-libstdcxx=-lstdc++ -lgcc_s"
|
||||||
|
"--with-stage1-libs=-lstdc++ -lgcc_s" ];
|
||||||
|
|
||||||
configureFlags = "
|
configureFlags = "
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
${if enableMultilib then "" else "--disable-multilib"}
|
||||||
${if enableShared then "" else "--disable-shared"}
|
${if enableShared then "" else "--disable-shared"}
|
||||||
|
|
|
@ -1,19 +1,28 @@
|
||||||
{ fetchurl, stdenv, ppl }:
|
{ fetchurl, stdenv, ppl, static ? false }:
|
||||||
|
|
||||||
|
|
||||||
|
let
|
||||||
|
# --with-host-libstdcxx helps when *ppl* is built statically.
|
||||||
|
# But I will suppose that this is statically built only when ppl is also
|
||||||
|
# statically built.
|
||||||
|
staticFlags = assert static -> ppl.dontDisableStatic == true;
|
||||||
|
if static then " --enable-static --disable-shared --with-host-libstdcxx=-lstdc++" else "";
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "cloog-ppl-0.15.7";
|
name = "cloog-ppl-0.15.9";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gcc/infrastructure/${name}.tar.gz";
|
url = "mirror://gcc/infrastructure/${name}.tar.gz";
|
||||||
sha256 = "0zb96524jk2l78gr5gw0wq3dnvdsmyr2av59v89zv5xcps417q55";
|
sha256 = "19a2n75k3d3n8llng25f2g88lpvd4zn0lm073rkndjw6l6yd8m4c";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ ppl ];
|
propagatedBuildInputs = [ ppl ];
|
||||||
|
|
||||||
configureFlags = "--with-ppl=${ppl}";
|
configureFlags = "--with-ppl=${ppl}" + staticFlags;
|
||||||
|
dontDisableStatic = if static then true else false;
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
configureFlags = "--with-ppl=${ppl.hostDrv}";
|
configureFlags = "--with-ppl=${ppl.hostDrv}" + staticFlags;
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{stdenv, fetchurl, m4, cxx ? true}:
|
{stdenv, fetchurl, m4, cxx ? true, static ? false}:
|
||||||
|
|
||||||
|
let
|
||||||
|
staticFlags = if static then " --enable-static --disable-shared" else "";
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "gmp-4.3.2";
|
name = "gmp-4.3.2";
|
||||||
|
@ -14,7 +18,11 @@ stdenv.mkDerivation rec {
|
||||||
# instructions (e.g., SSE2 on i686).
|
# instructions (e.g., SSE2 on i686).
|
||||||
preConfigure = "ln -sf configfsf.guess config.guess";
|
preConfigure = "ln -sf configfsf.guess config.guess";
|
||||||
|
|
||||||
configureFlags = if cxx then "--enable-cxx" else "--disable-cxx";
|
configureFlags = (if cxx then "--enable-cxx" else "--disable-cxx") +
|
||||||
|
staticFlags;
|
||||||
|
|
||||||
|
dontDisableStatic = if static then true else false;
|
||||||
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
{stdenv, fetchurl, m4, cxx ? true}:
|
{stdenv, fetchurl, m4, cxx ? true, static ? false}:
|
||||||
|
|
||||||
|
let
|
||||||
|
staticFlags = if static then " --enable-static --disable-shared" else "";
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "gmp-5.0.1";
|
name = "gmp-5.0.1";
|
||||||
|
@ -14,7 +18,10 @@ stdenv.mkDerivation rec {
|
||||||
# instructions (e.g., SSE2 on i686).
|
# instructions (e.g., SSE2 on i686).
|
||||||
preConfigure = "ln -sf configfsf.guess config.guess";
|
preConfigure = "ln -sf configfsf.guess config.guess";
|
||||||
|
|
||||||
configureFlags = if cxx then "--enable-cxx" else "--disable-cxx";
|
configureFlags = if cxx then "--enable-cxx" else "--disable-cxx" +
|
||||||
|
staticFlags;
|
||||||
|
|
||||||
|
dontDisableStatic = if static then true else false;
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{ fetchurl, stdenv, gmpxx, perl, gnum4 }:
|
{ fetchurl, stdenv, gmpxx, perl, gnum4, static ? false }:
|
||||||
|
|
||||||
let version = "0.10.2"; in
|
let
|
||||||
|
version = "0.10.2";
|
||||||
|
staticFlags = if static then " --enable-static --disable-shared" else "";
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "ppl-${version}";
|
name = "ppl-${version}";
|
||||||
|
|
||||||
|
@ -12,6 +15,9 @@ let version = "0.10.2"; in
|
||||||
buildNativeInputs = [ perl gnum4 ];
|
buildNativeInputs = [ perl gnum4 ];
|
||||||
propagatedBuildInputs = [ gmpxx ];
|
propagatedBuildInputs = [ gmpxx ];
|
||||||
|
|
||||||
|
dontDisableStatic = if static then true else false;
|
||||||
|
configureFlags = staticFlags;
|
||||||
|
|
||||||
# Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz
|
# Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz
|
||||||
# x86_64 box. Nevertheless, being a dependency of GCC, it probably ought
|
# x86_64 box. Nevertheless, being a dependency of GCC, it probably ought
|
||||||
# to be tested.
|
# to be tested.
|
||||||
|
|
|
@ -183,6 +183,18 @@ rec {
|
||||||
bootStdenv = stdenvLinuxBoot2;
|
bootStdenv = stdenvLinuxBoot2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gccWithStaticLibs = stdenvLinuxBoot2Pkgs.gcc.gcc.override (rec {
|
||||||
|
ppl = stdenvLinuxBoot2Pkgs.ppl.override {
|
||||||
|
static = true;
|
||||||
|
gmpxx = stdenvLinuxBoot2Pkgs.gmpxx.override {
|
||||||
|
static = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cloogppl = stdenvLinuxBoot2Pkgs.cloogppl.override {
|
||||||
|
inherit ppl;
|
||||||
|
static = true;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
# 6) Construct a third stdenv identical to the second, except that
|
# 6) Construct a third stdenv identical to the second, except that
|
||||||
# this one uses the dynamically linked GCC and Binutils from step
|
# this one uses the dynamically linked GCC and Binutils from step
|
||||||
|
@ -193,7 +205,7 @@ rec {
|
||||||
inherit (stdenvLinuxBoot2Pkgs) binutils;
|
inherit (stdenvLinuxBoot2Pkgs) binutils;
|
||||||
coreutils = bootstrapTools;
|
coreutils = bootstrapTools;
|
||||||
libc = stdenvLinuxGlibc;
|
libc = stdenvLinuxGlibc;
|
||||||
gcc = stdenvLinuxBoot2Pkgs.gcc.gcc;
|
gcc = gccWithStaticLibs;
|
||||||
name = "";
|
name = "";
|
||||||
};
|
};
|
||||||
extraAttrs = {
|
extraAttrs = {
|
||||||
|
@ -231,7 +243,7 @@ rec {
|
||||||
inherit (stdenvLinuxBoot2Pkgs) binutils;
|
inherit (stdenvLinuxBoot2Pkgs) binutils;
|
||||||
inherit (stdenvLinuxBoot3Pkgs) coreutils;
|
inherit (stdenvLinuxBoot3Pkgs) coreutils;
|
||||||
libc = stdenvLinuxGlibc;
|
libc = stdenvLinuxGlibc;
|
||||||
gcc = stdenvLinuxBoot2Pkgs.gcc.gcc;
|
gcc = gccWithStaticLibs;
|
||||||
shell = stdenvLinuxBoot3Pkgs.bash + "/bin/bash";
|
shell = stdenvLinuxBoot3Pkgs.bash + "/bin/bash";
|
||||||
name = "";
|
name = "";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue