diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index 910d93d42da1..bf33e1a1dad5 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -195,7 +195,7 @@ let ++ lib.optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" # TODO: aarch64-darwin has clang stdenv and its arch and cpu flag values are incompatible with gcc - ++ lib.optional (!(stdenv.isDarwin && stdenv.isAarch64)) (import ../common/platform-flags.nix { inherit (stdenv) targetPlatform; inherit lib; }) + ++ lib.optionals (!(stdenv.isDarwin && stdenv.isAarch64)) (import ../common/platform-flags.nix { inherit (stdenv) targetPlatform; inherit lib; }) ++ lib.optionals (targetPlatform != hostPlatform) crossConfigureFlags ++ lib.optional (targetPlatform != hostPlatform) "--disable-bootstrap"