From c3547bc6ebce55124a5c9a53c81686efbdd7a957 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 22 Feb 2023 22:25:58 -0800 Subject: [PATCH] gcc/{11,12}: update buildFlags for `--disable-bootstrap` case This commit updates the `buildFlags`, which is a single string with one of four possibilities: - "" - "profiled" - "bootstrap" - "profiledbootstrap" Previously only the last two were possible. Since 2ea34825020a74e5d62fb1a2fe819b165803ffd1 all four are possible. --- pkgs/development/compilers/gcc/11/default.nix | 6 +++--- pkgs/development/compilers/gcc/12/default.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index 3919fbe89f38..2f6e986f3eb8 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -249,9 +249,9 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = optional - (targetPlatform == hostPlatform && hostPlatform == buildPlatform) - (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + buildFlags = + lib.optionalString (profiledCompiler) "profiled" + + lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap"; inherit (callFile ../common/strip-attributes.nix { }) stripDebugList diff --git a/pkgs/development/compilers/gcc/12/default.nix b/pkgs/development/compilers/gcc/12/default.nix index 562d7113b6a2..ea3c6b2b16b5 100644 --- a/pkgs/development/compilers/gcc/12/default.nix +++ b/pkgs/development/compilers/gcc/12/default.nix @@ -281,9 +281,9 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = optional - (targetPlatform == hostPlatform && hostPlatform == buildPlatform) - (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + buildFlags = + lib.optionalString (profiledCompiler) "profiled" + + lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap"; inherit (callFile ../common/strip-attributes.nix { }) stripDebugList