Skip to content

Commit

Permalink
Merge pull request #217995 from amjoseph-nixpkgs/pr/gcc/disable-boots…
Browse files Browse the repository at this point in the history
…trap-buildFlags-again

gcc/{11,12}: update buildFlags for `--disable-bootstrap` case
  • Loading branch information
wegank committed Mar 8, 2023
2 parents a9f42c3 + 8a05f77 commit 042dd5c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions pkgs/development/compilers/gcc/11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions pkgs/development/compilers/gcc/12/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 042dd5c

Please sign in to comment.