gcc46: moving the bootstrap logic into nix

It was in the builder.sh.
This commit is contained in:
Lluís Batlle i Rossell 2012-12-27 14:54:44 +00:00
parent 120499c03a
commit e9365882c1
2 changed files with 9 additions and 10 deletions

View file

@ -243,13 +243,4 @@ postInstall() {
eval "$postInstallGhdl"
}
if test -z "$targetConfig" && test -z "$crossConfig"; then
if test -z "$profiledCompiler"; then
buildFlags="bootstrap $buildFlags"
else
buildFlags="profiledbootstrap $buildFlags"
fi
fi
genericBuild

View file

@ -156,6 +156,8 @@ let version = "4.6.3";
"-stage-final";
crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else "";
bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips;
in
# We need all these X libraries when building AWT with GTK+.
@ -230,7 +232,7 @@ stdenv.mkDerivation ({
''
else null;
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;
buildNativeInputs = [ texinfo which gettext ]
@ -297,10 +299,15 @@ stdenv.mkDerivation ({
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
";
targetConfig = if (cross != null) then cross.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
installTargets =
if stripped
then "install-strip"
@ -350,6 +357,7 @@ stdenv.mkDerivation ({
${if cross != null then crossConfigureFlags else ""}
--target=${stdenv.cross.config}
'';
buildFlags = "";
};