Skip to content

Fix GHC 9.6 mingwW64 cross compile #2394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
&& ((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`
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928"])
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (nixpkgsName == "unstable"
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions overlays/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ in {
# This one will lead to segv's on darwin, when calling `strlen` during lookupStrHashTable. `strlen` ends up being called with 0x0.
# This patch will allow adding additional symbols to iserv, instead of having to patch them into GHC all the time.
++ final.lib.optionals (
(final.stdenv.targetPlatform.isAndroid || final.stdenv.targetPlatform.isLinux)
&& (final.stdenv.targetPlatform.isAarch64 || final.stdenv.targetPlatform.is32bit))
final.stdenv.targetPlatform.isWindows ||
( (final.stdenv.targetPlatform.isAndroid || final.stdenv.targetPlatform.isLinux)
&& (final.stdenv.targetPlatform.isAarch64 || final.stdenv.targetPlatform.is32bit)))
(fromUntil "9.6.1" "9.11" ./patches/ghc/iserv-syms.patch)
++ onAndroid (until "9.0" ./patches/ghc/ghc-8.10.7-weak-symbols-2.patch)
++ onDarwin (onAarch64 (until "9.0" ./patches/ghc/ghc-8.10.7-rts-aarch64-darwin.patch))
Expand Down
2 changes: 1 addition & 1 deletion test/cabal.project.local
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repository head.hackage.ghc.haskell.org
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
--sha256: sha256-Zu+OsPXt+tUllxC2LVJ3jneYGUH5GvdemZZPnynWaN0=
--sha256: sha256-Fn+JdHvwpbhYz5ffZU6+2HFZHLMLgah564mMdyUHKL4=

repository ghcjs-overlay
url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b
Expand Down
4 changes: 3 additions & 1 deletion test/th-dlls/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ in recurseIntoAttrs {
build-ei = packages-ei.th-dlls.components.library;
just-template-haskell-ei = packages-ei.th-dlls.components.exes.just-template-haskell;
} // optionalAttrs
(!(builtins.elem compiler-nix-name ["ghc984" "ghc9122" "ghc91320250523"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) {
(!(builtins.elem compiler-nix-name ["ghc984" "ghc9122" "ghc91320250523"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64
# The dependency on `math-functions` somehow breaks GHC 9.6.7 musl profiled builds (only with the external interpreter though)
|| (compiler-nix-name == "ghc967" && stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_64))) {
# On for aarch64 cross compile on GHC this test is fails sometimes for non profiled builds
# (and always for the profiled builds).
# This may be related to the memory allocation changes made in 9.8.4 that
Expand Down
3 changes: 3 additions & 0 deletions test/th-dlls/th-dlls.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ library
, double-conversion
, unix-time
, th-orphans
, ghc-prim
, math-functions
, erf
exposed-modules: Lib
hs-source-dirs: src
default-language: Haskell2010
Expand Down
Loading