diff --git a/pkgs/development/compilers/gcc-apple/builder.sh b/pkgs/development/compilers/gcc-apple/builder.sh index a10813e5e33..315baf37b22 100644 --- a/pkgs/development/compilers/gcc-apple/builder.sh +++ b/pkgs/development/compilers/gcc-apple/builder.sh @@ -67,7 +67,7 @@ preConfigure() { cd ../build configureScript=../$sourceRoot/configure - configureFlags="--enable-languages=$langs --disable-libstdcxx-pch" + configureFlags="--enable-languages=$langs --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-multilib" } @@ -81,5 +81,43 @@ postInstall() { rm -rf $out/libexec/gcc/*/*/install-tools } +postUnpack() { + pwd + ls -l + mv libstdcxx-16/libstdcxx $sourceRoot/ +} + +genericBuild + + +echo '-------------------------------------------------------------------------------------------------------------------------' +echo 'libstdcxx-16' +echo '-------------------------------------------------------------------------------------------------------------------------' + +cd .. +pwd + +preConfigure() { + # Perform the build in a different directory. + mkdir ../build_libstdcxx + cd ../build_libstdcxx + + ln -s ../build/gcc gcc + + configureScript=../$sourceRoot/libstdcxx/configure + configureFlags="--disable-libstdcxx-pch --disable-libstdcxx-debug --disable-multilib" +} + +unpackPhase () { + echo '-' +} + +postInstall() { + echo '-' +} + +patchPhase() { + echo '-' +} genericBuild diff --git a/pkgs/development/compilers/gcc-apple/default.nix b/pkgs/development/compilers/gcc-apple/default.nix index a5f89455501..8006bd4426d 100644 --- a/pkgs/development/compilers/gcc-apple/default.nix +++ b/pkgs/development/compilers/gcc-apple/default.nix @@ -9,14 +9,21 @@ assert stdenv.isDarwin; assert langF77 -> gmp != null; stdenv.mkDerivation ({ - name = "gcc-4.0.1-apple-5341"; + name = "gcc-4.2.1-apple-5574"; builder = ./builder.sh; - src = fetchurl { - url = http://www.opensource.apple.com/darwinsource/tarballs/other/gcc-5341.tar.gz; - md5 = "a135f107ddc55b773b40dfff4f049640"; - }; + src = + stdenv.lib.optional /*langC*/ true (fetchurl { + url = http://www.opensource.apple.com/tarballs/gcc_42/gcc_42-5574.tar.gz ; + sha256 = "0b76ef3cded7822e3c0ec430f9811b6bb84895055b683acd2df7f7253d745a50"; + }) ++ + stdenv.lib.optional langCC (fetchurl { + url = http://www.opensource.apple.com/tarballs/libstdcxx/libstdcxx-16.tar.gz ; + sha256 = "a7d8041e50e110f5a503e188a05cb217f0c99c51f248a0a1387cc07a0b6f167f"; + }) ; + + sourceRoot = "gcc_42-5574/"; patches = - [./pass-cxxcpp.patch] + [./pass-cxxcpp.patch ./debug_list.patch] ++ (if noSysDirs then [./no-sys-dirs.patch] else []); inherit noSysDirs langC langCC langF77 profiledCompiler; } // (if langF77 then {buildInputs = [gmp mpfr bison flex];} else {}))