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
commit 042dd5c271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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