From 0aa01bef762611eed3f3fc47023902d4d32759a0 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 7 Jan 2023 18:33:36 +0100 Subject: [PATCH] pkgsCross.ghcjs.haskellPackages.ghc: don't revert edited config.sub GHC ships a [modified] config.sub so that js-unknown-ghcjs is accepted by autotools. For some platforms, we automatically update config.sub from upstream's source in order to prevent that builds fail when we use an outdated config.sub. In this case of course the perfectly up to date config.sub would reject the target platform we are trying to use, so we must disable this mechanism for now. I have asked in the GHC IRC channel if there are any plans on upstreaming the platform. It would be nice if were able to drop this change in the future. --- pkgs/development/compilers/ghc/common-hadrian.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 15073bfec1076..5f0953b1bca3e 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -353,6 +353,8 @@ stdenv.mkDerivation ({ ''; ${if targetPlatform.isGhcjs then "configureScript" else null} = "emconfigure ./configure"; + # GHC currently ships an edited config.sub so ghcjs is accepted which we can not rollback + ${if targetPlatform.isGhcjs then "dontUpdateAutotoolsGnuConfigScripts" else null} = true; # TODO(@Ericson2314): Always pass "--target" and always prefix. configurePlatforms = [ "build" "host" ]