Skip to content

Commit b37d67b

Browse files
committed
Scope gcc14 fixincludes override to x86_64-linux only
Using isLinux also changed aarch64-linux gcc14, which cascades through the entire IFD chain (gcc14 → stdenv → glibc → linux-headers → GHC → nix-tools → plan-nix). This forces linux-headers to be rebuilt, but linux-headers fails on darwin builders' case-insensitive APFS (netfilter headers like xt_TCPMSS.h vs xt_tcpmss.h collide). The fixincludes issue only affects x86_64-linux GCC builds on the Determinate Nix Linux VM.
1 parent 0163079 commit b37d67b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

flake.nix

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@
4949
happy = final.haskell.lib.compose.overrideCabal (drv: {
5050
disallowGhcReference = false;
5151
}) prev.happy;
52-
} // prev.lib.optionalAttrs prev.stdenv.hostPlatform.isLinux {
52+
} // prev.lib.optionalAttrs (prev.stdenv.hostPlatform.system == "x86_64-linux") {
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
56-
# Linux VM), /usr/include doesn't exist, causing all x86_64-linux
57-
# GCC builds to fail — which cascades to all Windows cross-builds
58-
# that depend on the native GCC bootstrap compiler.
56+
# Linux VM), /usr/include doesn't exist, causing x86_64-linux
57+
# GCC builds to fail — cascading to all Windows cross-builds.
5958
# --disable-fixincludes skips the fixincludes step entirely, which
6059
# is safe for Nix where all headers are store-managed. Already
6160
# used by nixpkgs' standalone libgcc build for the same reason.
62-
# Only applied on Linux — avoids unnecessary gcc14 rebuilds on
63-
# Darwin (where gfortran fails against Apple SDK 14.4) and
64-
# Windows (where the mingw cross-GCC doesn't have this issue).
61+
# Scoped to x86_64-linux only: on Darwin, gfortran bootstrap fails
62+
# (Apple SDK __FLT_EVAL_METHOD__); on aarch64-linux, changing gcc14
63+
# cascades through the entire IFD chain, and linux-headers can't be
64+
# rebuilt on darwin builders (case-insensitive APFS).
6565
gcc14 = prev.wrapCC (
6666
prev.gcc14.cc.overrideAttrs (old: {
6767
configureFlags = (old.configureFlags or []) ++ [ "--disable-fixincludes" ];

0 commit comments

Comments
 (0)