From f06ab170fae68622dbfd254aac094fb13b0cfcaa Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 7 Apr 2023 13:50:35 -0700 Subject: [PATCH] gcc: never disableBootstrap for gfortran As suggested by @trofi here: https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500635687 This should fix failures among packages which use gfortran: https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903 https://hydra.nixos.org/build/215195834 --- pkgs/development/compilers/gcc/common/configure-flags.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index eadc6967acfc..e0f7ccc7b59a 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -44,6 +44,9 @@ let inherit (stdenv) buildPlatform hostPlatform targetPlatform; + # See https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903 + disableBootstrap' = disableBootstrap && !langFortran; + crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; @@ -217,7 +220,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 disableBootstrap "--disable-bootstrap" + ++ lib.optional disableBootstrap' "--disable-bootstrap" # Platform-specific flags ++ lib.optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"