diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2017-08-16 22:35:06 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2017-08-17 21:00:05 +0200 |
commit | 261cbdbe194f9d80b8e6d710c21000ded15389cf (patch) | |
tree | 496858466ac99c16f18dd5b65f86d97658599eab /pkgs/development/compilers | |
parent | 8f2ea38f8fda5876cfaf963097b9fe709159f3ff (diff) | |
download | nixpkgs-261cbdbe194f9d80b8e6d710c21000ded15389cf.tar nixpkgs-261cbdbe194f9d80b8e6d710c21000ded15389cf.tar.gz nixpkgs-261cbdbe194f9d80b8e6d710c21000ded15389cf.tar.bz2 nixpkgs-261cbdbe194f9d80b8e6d710c21000ded15389cf.tar.lz nixpkgs-261cbdbe194f9d80b8e6d710c21000ded15389cf.tar.xz nixpkgs-261cbdbe194f9d80b8e6d710c21000ded15389cf.tar.zst nixpkgs-261cbdbe194f9d80b8e6d710c21000ded15389cf.zip |
gcc6: port darwin changes from 5.x
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index b091fd1ae37..71e2238a27f 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -226,6 +226,19 @@ stdenv.mkDerivation ({ hardeningDisable = [ "format" ]; + # This should kill all the stdinc frameworks that gcc and friends like to + # insert into default search paths. + prePatch = stdenv.lib.optionalString hostPlatform.isDarwin '' + substituteInPlace gcc/config/darwin-c.c \ + --replace 'if (stdinc)' 'if (0)' + + substituteInPlace libgcc/config/t-slibgcc-darwin \ + --replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name $lib/lib/\$(SHLIB_INSTALL_NAME)" + + substituteInPlace libgfortran/configure \ + --replace "-install_name \\\$rpath/\\\$soname" "-install_name $lib/lib/\\\$soname" + ''; + postPatch = if (hostPlatform.isHurd || (libcCross != null # e.g., building `gcc.crossDrv' |