Skip to content

ghc: Fix regression in unregisterised builds#487958

Merged
sternenseemann merged 1 commit intoNixOS:haskell-updatesfrom
AlexandreTunstall:fix-ghc-unreg-gnu23
Feb 8, 2026
Merged

ghc: Fix regression in unregisterised builds#487958
sternenseemann merged 1 commit intoNixOS:haskell-updatesfrom
AlexandreTunstall:fix-ghc-unreg-gnu23

Conversation

@AlexandreTunstall
Copy link
Contributor

The default GCC compiler in Nixpkgs was recently changed, bringing in a new default C standard (gnu23), which GHC's C backend is not compatible with.
This fix adds a flag to force GCC to use an older compatible C standard.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
    • [NixOS tests] in [nixos/tests].
    • [Package tests] at passthru.tests.
    • Tests in [lib/tests] or [pkgs/test] for functions and "core" functionality.
  • Ran nixpkgs-review on this PR. See [nixpkgs-review usage].
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits [CONTRIBUTING.md], [pkgs/README.md], [maintainers/README.md] and other READMEs.

The default GCC compiler in Nixpkgs was recently changed, bringing in a
new default C standard (gnu23), which GHC's C backend is not compatible
with.
This fix adds a flag to force GCC to use an older compatible C standard.
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: haskell General-purpose, statically typed, purely functional programming language labels Feb 7, 2026
Copy link
Member

@sternenseemann sternenseemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you get a minute, it would be interesting to check whether upstream has already looked into fixing the C output for later versions of GHC.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Feb 7, 2026
@AlexandreTunstall
Copy link
Contributor Author

When you get a minute, it would be interesting to check whether upstream has already looked into fixing the C output for later versions of GHC.

This is a good point, as we may want the same fix for some of the Hadrian-based GHCs, which I have not yet looked into.

@AlexandreTunstall
Copy link
Contributor Author

All Hadrian versions fail unregisterised, so they too need this fix.

However, I will leave that out of this PR.

@sternenseemann sternenseemann added this pull request to the merge queue Feb 8, 2026
Merged via the queue into NixOS:haskell-updates with commit 9b8edf6 Feb 8, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants