diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index 46b2404e99e5..de82b1795ba3 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -420,6 +420,8 @@ lib.pipe ((callFile ./common/builder.nix {}) ({ ; } // lib.optionalAttrs (!atLeast11) { badPlatforms = if !(is48 || is49) then [ "aarch64-darwin" ] else lib.platforms.darwin; + } // lib.optionalAttrs is11 { + badPlatforms = if targetPlatform != hostPlatform then [ "aarch64-darwin" ] else [ ]; }; } // lib.optionalAttrs (!atLeast10 && stdenv.targetPlatform.isDarwin) { # GCC <10 requires default cctools `strip` instead of `llvm-strip` used by Darwin bintools.