diff --git a/pkgs/development/compilers/gcc-3.4/builder.sh b/pkgs/development/compilers/gcc-3.4/builder.sh index 5a89201377d6..eb1f211dce8f 100644 --- a/pkgs/development/compilers/gcc-3.4/builder.sh +++ b/pkgs/development/compilers/gcc-3.4/builder.sh @@ -37,22 +37,10 @@ fi preConfigure=preConfigure preConfigure() { - - # Determine the frontends to build. - langs="c" - if test -n "$langCC"; then - langs="$langs,c++" - fi - if test -n "$langF77"; then - langs="$langs,f77" - fi - # Perform the build in a different directory. mkdir ../build cd ../build - configureScript=../$sourceRoot/configure - configureFlags="--enable-languages=$langs $configureFlags" } diff --git a/pkgs/development/compilers/gcc-3.4/default.nix b/pkgs/development/compilers/gcc-3.4/default.nix index 4cb834304e3e..de7f079b2d90 100644 --- a/pkgs/development/compilers/gcc-3.4/default.nix +++ b/pkgs/development/compilers/gcc-3.4/default.nix @@ -5,6 +5,8 @@ assert langC; +with import ../../../lib; + stdenv.mkDerivation { name = "gcc-3.4.6"; builder = ./builder.sh; @@ -15,7 +17,22 @@ stdenv.mkDerivation { patches = if noSysDirs then [./no-sys-dirs.patch] else []; - inherit noSysDirs langC langCC langF77 profiledCompiler; + inherit noSysDirs profiledCompiler; + + configureFlags = " + --disable-multilib + --with-system-zlib + --enable-languages=${ + concatStrings (intersperse "," + ( optional langC "c" + ++ optional langCC "c++" + ++ optional langF77 "f77" + ) + ) + } + "; + + passthru = { inherit langC langCC langF77; }; meta = { homepage = "http://gcc.gnu.org/";