Skip to content

Commit

Permalink
Add rts exports patch
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Jun 8, 2021
1 parent 5e8637d commit fe69fdc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion overlays/bootstrap.nix
Expand Up @@ -162,7 +162,8 @@ in {
++ final.lib.optional (versionAtLeast "8.6.5") ./patches/ghc/ghc-8.10-windows-add-dependent-file.patch
++ fromUntil "8.10.1" "9.0" ./patches/ghc/Cabal-unbreak-GHCJS.patch
++ until "8.10.5" ./patches/ghc/AC_PROG_CC_99.patch
++ fromUntil "9.0.1" "9.0.2" ./patches/ghc/AC_PROG_CC_99.patch
++ fromUntil "9.0.1" "9.0.2" ./patches/ghc/AC_PROG_CC_99.patch
++ fromUntil "8.10.5" "9.0.2" ./patches/ghc/ghc-8.10.5-add-rts-exports.patch
;
in ({
ghc844 = final.callPackage ../compiler/ghc {
Expand Down
26 changes: 26 additions & 0 deletions overlays/patches/ghc/ghc-8.10.5-add-rts-exports.patch
@@ -0,0 +1,26 @@
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index 9ca696c27c441059fb0fd82854e0737d5eccf2ad..d5b8cc5fece8395d277dd01cabdc309ac33406da 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -539,11 +539,21 @@
#define RTS_PROF_SYMBOLS /* empty */
#endif

+#if RTS_LINKER_USE_MMAP
+#define RTS_LINKER_USE_MMAP_SYMBOLS \
+ SymI_HasProto(allocateWrite) \
+ SymI_HasProto(freeWrite) \
+ SymI_HasProto(markExec)
+#else
+#define RTS_LINKER_USE_MMAP_SYMBOLS /* empty */
+#endif
+
#define RTS_SYMBOLS \
Maybe_Stable_Names \
RTS_TICKY_SYMBOLS \
RTS_PROF_SYMBOLS \
RTS_LIBDW_SYMBOLS \
+ RTS_LINKER_USE_MMAP_SYMBOLS \
SymI_HasProto(StgReturn) \
SymI_HasProto(stg_gc_noregs) \
SymI_HasProto(stg_ret_v_info) \

0 comments on commit fe69fdc

Please sign in to comment.