diff options
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/common/pre-configure.nix | 10 |
2 files changed, 10 insertions, 6 deletions
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index b3d0f8d5d502e..571d0b023124c 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -154,7 +154,10 @@ stdenv.mkDerivation ({ hardeningDisable = [ "format" "pie" ]; - outputs = if langJava || langGo then ["out" "man" "info"] + # When targetting darwin, libgcc_ext.10.{4,5}.dylib are created as + # MH_DYLIB_STUB files, which install_name_tool can't change, so we + # get a cycle between $out and $lib. + outputs = if langJava || langGo || targetPlatform.isDarwin then ["out" "man" "info"] else [ "out" "lib" "man" "info" ]; setOutputFlags = false; NIX_NO_SELF_RPATH = true; @@ -328,7 +331,6 @@ stdenv.mkDerivation ({ maintainers = with lib.maintainers; [ veprbl ]; platforms = lib.platforms.unix; - badPlatforms = lib.platforms.darwin; }; } diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index d9977e0ba2f9e..310e7f8b574bd 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -6,14 +6,16 @@ , langGo }: assert langJava -> lib.versionOlder version "7"; -assert langAda -> gnatboot != null; - -lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' +assert langAda -> gnatboot != null; let + needsLib + = (lib.versionOlder version "7" && (langJava || langGo)) + || (lib.versions.major version == "4" && lib.versions.minor version == "9" && targetPlatform.isDarwin); +in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" -'' + lib.optionalString (lib.versionOlder version "7" && (langJava || langGo)) '' +'' + lib.optionalString needsLib '' export lib=$out; '' + lib.optionalString langAda '' export PATH=${gnatboot}/bin:$PATH |