Skip to content
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

fix some aarch64-musl libc loading issues #2115

Merged
merged 1 commit into from
Nov 28, 2023
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
1 change: 1 addition & 0 deletions overlays/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ in {
# ++ fromUntil "9.6.1" "9.10" ./patches/ghc/iserv-syms.patch
# Fix the bad fixups: https://gitlab.haskell.org/ghc/ghc/-/commit/2adc050857a9c1b992040fbfd55fbe65b2851b19
++ final.lib.optional (versionAtLeast "9.6" && versionLessThan "9.8" && final.stdenv.targetPlatform.isAarch64) ./patches/ghc/2adc050857a9c1b992040fbfd55fbe65b2851b19.patch
++ final.lib.optional (versionAtLeast "8.10.7" && versionLessThan "9.0" && final.stdenv.targetPlatform.isAarch64 && final.stdenv.targetPlatform.isMusl && final.stdenv.targetPlatform != final.stdenv.hostPlatform) ./patches/ghc/ghc-8.10-aarch64-musl-gettimeofday.patch
;
in ({
ghc865 = final.callPackage ../compiler/ghc (traceWarnOld "8.6" {
Expand Down
18 changes: 18 additions & 0 deletions overlays/patches/ghc/ghc-8.10-aarch64-musl-gettimeofday.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index e0901c3..05a4310 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -991,9 +991,13 @@
SymI_HasProto(cas) \
SymI_HasProto(_assertFail) \
SymI_HasProto(keepCAFs) \
+ SymI_NeedsProto(gettimeofday) \
+ SymI_HasProto(clock) \
RTS_USER_SIGNALS_SYMBOLS \
RTS_INTCHAR_SYMBOLS

+ // need gettimeofday, clock for split-mix; otherwise will segv when calling this from iserv :-/
+

// 64-bit support functions in libgcc.a
#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32)