gcc49: Fix build on darwin
This commit is contained in:
parent
68c94a2786
commit
8e6206f9c9
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12812,6 +12812,9 @@ with pkgs;
|
|||
isl = if !stdenv.isDarwin then isl_0_11 else null;
|
||||
|
||||
cloog = if !stdenv.isDarwin then cloog_0_18_0 else null;
|
||||
|
||||
# Build fails on Darwin with clang
|
||||
stdenv = if stdenv.isDarwin then gccStdenv else stdenv;
|
||||
}));
|
||||
|
||||
gcc6 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/6 {
|
||||
|
|
Loading…
Reference in a new issue