Skip to content

Commit

Permalink
Merge pull request #216136 from amjoseph-nixpkgs/pr/gcc/enableBootstrap
Browse files Browse the repository at this point in the history
gcc: expose --disable-bootstrap as disableBootstrap
  • Loading branch information
trofi committed Feb 18, 2023
2 parents 770622d + 37fe161 commit 2ea3482
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkgs/development/compilers/gcc/11/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -115,6 +116,7 @@ let majorVersion = "11";
enableMultilib
enablePlugin
enableShared
disableBootstrap
fetchpatch
fetchurl
gettext
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/compilers/gcc/12/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -142,6 +143,7 @@ let majorVersion = "12";
buildPackages
cloog
crossStageStatic
disableBootstrap
enableLTO
enableMultilib
enablePlugin
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/compilers/gcc/common/configure-flags.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
, langObjC
, langObjCpp
, langJit
, disableBootstrap ? stdenv.targetPlatform != stdenv.hostPlatform
}:

assert langJava -> lib.versionOlder version "7";
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 2ea3482

Please sign in to comment.