Merge pull request #217995 from amjoseph-nixpkgs/pr/gcc/disable-bootstrap-buildFlags-again

gcc/{11,12}: update buildFlags for `--disable-bootstrap` case
This commit is contained in:
Weijia Wang
2023-03-08 09:36:51 +02:00
committed by GitHub
2 changed files with 10 additions and 6 deletions
@@ -249,9 +249,11 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags =
let target =
lib.optionalString (profiledCompiler) "profiled" +
lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap";
in lib.optional (target != "") target;
inherit (callFile ../common/strip-attributes.nix { })
stripDebugList
@@ -284,9 +284,11 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags =
let target =
lib.optionalString (profiledCompiler) "profiled" +
lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap";
in lib.optional (target != "") target;
inherit (callFile ../common/strip-attributes.nix { })
stripDebugList