Unverified Commit 9cc5b1ec authored by Alex Tunstall's avatar Alex Tunstall
Browse files

ghc: Fix regression in unregisterised builds

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.
parent e7136c15
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -536,6 +536,8 @@ stdenv.mkDerivation (
    ]
    ++ lib.optionals enableUnregisterised [
      "--enable-unregisterised"
      # The C backend generates code incompatible with gnu23
      "CONF_CC_OPTS_STAGE2=-std=gnu17"
    ];

    # Make sure we never relax`$PATH` and hooks support for compatibility.