diff options
author | Dan Peebles <pumpkin@me.com> | 2017-03-21 01:36:28 -0400 |
---|---|---|
committer | Dan Peebles <pumpkin@me.com> | 2017-03-21 01:36:28 -0400 |
commit | a2a82db7cf3eda1a17abe2f673291852c4a85ba9 (patch) | |
tree | 8192f61b3d12de04534f9c3a7f1590c782aa1d6b /pkgs/development/compilers/gcc/5 | |
parent | 7ad3fd7ca72113d2790aa223afdb9faa70e9fb7d (diff) | |
download | nixlib-a2a82db7cf3eda1a17abe2f673291852c4a85ba9.tar nixlib-a2a82db7cf3eda1a17abe2f673291852c4a85ba9.tar.gz nixlib-a2a82db7cf3eda1a17abe2f673291852c4a85ba9.tar.bz2 nixlib-a2a82db7cf3eda1a17abe2f673291852c4a85ba9.tar.lz nixlib-a2a82db7cf3eda1a17abe2f673291852c4a85ba9.tar.xz nixlib-a2a82db7cf3eda1a17abe2f673291852c4a85ba9.tar.zst nixlib-a2a82db7cf3eda1a17abe2f673291852c4a85ba9.zip |
gfortran/gcc: simplify & clean up on Darwin
This should eliminate the branched logic for gfortran on Darwin, as well as preventing accidental inclusion of impure paths in gcc and gfortran builds.
Diffstat (limited to 'pkgs/development/compilers/gcc/5')
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index da4f7a606705..3e9104a82fbc 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -76,7 +76,8 @@ let version = "5.4.0"; ++ optional langAda ../gnat-cflags.patch ++ optional langFortran ../gfortran-driving.patch - # This could be applied unconditionally but I don't want to cause a full Linux rebuild. + # This could be applied unconditionally but I don't want to cause a full + # Linux rebuild. ++ optional stdenv.cc.isClang ./libcxx38-and-above.patch; javaEcj = fetchurl { @@ -234,6 +235,13 @@ stdenv.mkDerivation ({ libc_dev = stdenv.cc.libc_dev; + # This should kill all the stdinc frameworks that gcc and friends like to + # insert into default search paths. + prePatch = if stdenv.isDarwin then '' + substituteInPlace gcc/config/darwin-c.c \ + --replace 'if (stdinc)' 'if (0)' + '' else null; + postPatch = if (stdenv.isGNU || (libcCross != null # e.g., building `gcc.crossDrv' |