diff options
Diffstat (limited to 'pkgs/development/compilers/gcc/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index 0980944dfc294..0fe23000cc900 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -33,6 +33,7 @@ , nukeReferences , callPackage , majorMinorVersion +, darwin # only for gcc<=6.x , langJava ? false @@ -408,10 +409,15 @@ lib.pipe ((callFile ./common/builder.nix {}) ({ maintainers ; } // lib.optionalAttrs (!atLeast11) { - badPlatforms = if !is49 then [ "aarch64-darwin" ] else lib.platforms.darwin; + badPlatforms = if !(is48 || is49) then [ "aarch64-darwin" ] else lib.platforms.darwin; }; } // optionalAttrs is7 { env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"; +} // lib.optionalAttrs (!atLeast10 && stdenv.hostPlatform.isDarwin) { + # GCC <10 requires default cctools `strip` instead of `llvm-strip` used by Darwin bintools. + preBuild = '' + makeFlagsArray+=('STRIP=${lib.getBin darwin.cctools-port}/bin/${stdenv.cc.targetPrefix}strip') + ''; } // optionalAttrs (!atLeast7) { env.langJava = langJava; } // optionalAttrs atLeast6 { |