From ece10a711f5a2c406d8907c66c99c61f776c2ac1 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 7 May 2022 06:30:58 -0400 Subject: [PATCH] ghcHEAD: Fix Windows cross-compilation with lld. By specifying pkgs.libffi here instead of letting callPackage handle it, we confuse the splicing logic and put the host libffi into NIX_LDFLAGS_FOR_TARGET. This previously hasn't been a problem, as we also pass an explicit configure flag pointing to the target libffi, and so the only side-effect is a senseless -rpath flag. ld.lld (rightly) does not recognize the -rpath flag when targeting Windows, however, so this causes build failures. --- pkgs/top-level/haskell-packages.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index c46a7f1bcd2..fac1d546832 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -145,7 +145,6 @@ in { inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12; llvmPackages = pkgs.llvmPackages_12; - libffi = pkgs.libffi; }; ghcjs = compiler.ghcjs810;