Skip to content

Commit a4b5fe1

Browse files
authored
Fix GHC 9.6 mingwW64 cross compile (#2394)
* Fix GHC 9.6 mingwW64 cross compile * Add iserv-syms.patch to just windows and musl * Try just on Windows * Disable broken test * Update head.hackage
1 parent 450eba5 commit a4b5fe1

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

ci.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
inherit (lib.systems.examples) ghcjs;
9090
} // lib.optionalAttrs (nixpkgsName == "unstable"
9191
&& (__match ".*llvm" compiler-nix-name == null)
92-
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc966" "ghc967" "ghc96720250227"]) # Not sure why GHC 9.6.6 TH code now wants `log1pf`
92+
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928"])
9393
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
9494
inherit (lib.systems.examples) mingwW64;
9595
} // lib.optionalAttrs (nixpkgsName == "unstable"

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

overlays/bootstrap.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,9 @@ in {
230230
# This one will lead to segv's on darwin, when calling `strlen` during lookupStrHashTable. `strlen` ends up being called with 0x0.
231231
# This patch will allow adding additional symbols to iserv, instead of having to patch them into GHC all the time.
232232
++ final.lib.optionals (
233-
(final.stdenv.targetPlatform.isAndroid || final.stdenv.targetPlatform.isLinux)
234-
&& (final.stdenv.targetPlatform.isAarch64 || final.stdenv.targetPlatform.is32bit))
233+
final.stdenv.targetPlatform.isWindows ||
234+
( (final.stdenv.targetPlatform.isAndroid || final.stdenv.targetPlatform.isLinux)
235+
&& (final.stdenv.targetPlatform.isAarch64 || final.stdenv.targetPlatform.is32bit)))
235236
(fromUntil "9.6.1" "9.11" ./patches/ghc/iserv-syms.patch)
236237
++ onAndroid (until "9.0" ./patches/ghc/ghc-8.10.7-weak-symbols-2.patch)
237238
++ onDarwin (onAarch64 (until "9.0" ./patches/ghc/ghc-8.10.7-rts-aarch64-darwin.patch))

test/cabal.project.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repository head.hackage.ghc.haskell.org
2929
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
3030
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
3131
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
32-
--sha256: sha256-Zu+OsPXt+tUllxC2LVJ3jneYGUH5GvdemZZPnynWaN0=
32+
--sha256: sha256-Fn+JdHvwpbhYz5ffZU6+2HFZHLMLgah564mMdyUHKL4=
3333

3434
repository ghcjs-overlay
3535
url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b

test/th-dlls/default.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ in recurseIntoAttrs {
4343
build-ei = packages-ei.th-dlls.components.library;
4444
just-template-haskell-ei = packages-ei.th-dlls.components.exes.just-template-haskell;
4545
} // optionalAttrs
46-
(!(builtins.elem compiler-nix-name ["ghc984" "ghc9122" "ghc91320250523"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) {
46+
(!(builtins.elem compiler-nix-name ["ghc984" "ghc9122" "ghc91320250523"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64
47+
# The dependency on `math-functions` somehow breaks GHC 9.6.7 musl profiled builds (only with the external interpreter though)
48+
|| (compiler-nix-name == "ghc967" && stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_64))) {
4749
# On for aarch64 cross compile on GHC this test is fails sometimes for non profiled builds
4850
# (and always for the profiled builds).
4951
# This may be related to the memory allocation changes made in 9.8.4 that

test/th-dlls/th-dlls.cabal

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ library
1515
, double-conversion
1616
, unix-time
1717
, th-orphans
18+
, ghc-prim
19+
, math-functions
20+
, erf
1821
exposed-modules: Lib
1922
hs-source-dirs: src
2023
default-language: Haskell2010

0 commit comments

Comments
 (0)