Skip to content

Commit f3dd8cf

Browse files
committed
Scope gcc14 fixincludes override to Linux only
The gcc14 override with --disable-fixincludes was applied globally, including aarch64-darwin where gfortran fails to bootstrap against Apple SDK 14.4 (__FLT_EVAL_METHOD__ error in math.h). This caused the Hydra evaluator to get stuck in an infinite retry loop for 12+ hours trying to build gfortran on darwin builders during IFD. Scope the override to !isDarwin using optionalAttrs. The fixincludes issue only affects Linux builders (Determinate Nix VM lacks /usr/include).
1 parent 474cbb6 commit f3dd8cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flake.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
happy = final.haskell.lib.compose.overrideCabal (drv: {
5050
disallowGhcReference = false;
5151
}) prev.happy;
52-
52+
} // prev.lib.optionalAttrs (!prev.stdenv.hostPlatform.isDarwin) {
5353
# GCC 14's fixincludes step uses a configure-time substitution
5454
# @BUILD_SYSTEM_HEADER_DIR@ that bakes /usr/include into the
5555
# generated Makefile. On NixOS-based builders (Determinate Nix
@@ -59,6 +59,8 @@
5959
# --disable-fixincludes skips the fixincludes step entirely, which
6060
# is safe for Nix where all headers are store-managed. Already
6161
# used by nixpkgs' standalone libgcc build for the same reason.
62+
# Only applied on Linux — on Darwin, GCC 14 bootstrap fails with
63+
# __FLT_EVAL_METHOD__ errors against Apple SDK 14.4.
6264
gcc14 = prev.wrapCC (
6365
prev.gcc14.cc.overrideAttrs (old: {
6466
configureFlags = (old.configureFlags or []) ++ [ "--disable-fixincludes" ];

0 commit comments

Comments
 (0)