diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 3ae54fc3b91b9..15b21fcdbeaeb 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -48,6 +48,7 @@ with builtins; let majorVersion = "11"; version = "${majorVersion}.3.0"; + disableBootstrap = !(with stdenv; targetPlatform == hostPlatform && hostPlatform == buildPlatform); inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -115,6 +116,7 @@ let majorVersion = "11"; enableMultilib enablePlugin enableShared + disableBootstrap fetchpatch fetchurl gettext diff --git a/pkgs/development/compilers/gcc/12/default.nix b/pkgs/development/compilers/gcc/12/default.nix index 63168968cd6be..20da29fc9b1e6 100644 --- a/pkgs/development/compilers/gcc/12/default.nix +++ b/pkgs/development/compilers/gcc/12/default.nix @@ -53,6 +53,7 @@ with builtins; let majorVersion = "12"; version = "${majorVersion}.2.0"; + disableBootstrap = !(with stdenv; targetPlatform == hostPlatform && hostPlatform == buildPlatform); inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -142,6 +143,7 @@ let majorVersion = "12"; buildPackages cloog crossStageStatic + disableBootstrap enableLTO enableMultilib enablePlugin diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index 78d13cb941e3c..e3a4aa7cccdff 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -23,6 +23,7 @@ , langObjC , langObjCpp , langJit +, disableBootstrap ? stdenv.targetPlatform != stdenv.hostPlatform }: assert langJava -> lib.versionOlder version "7"; @@ -214,7 +215,7 @@ let # TODO: aarch64-darwin has clang stdenv and its arch and cpu flag values are incompatible with gcc ++ 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" + ++ lib.optional disableBootstrap "--disable-bootstrap" # Platform-specific flags ++ lib.optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"