on iko/ghcjs-patch-master help sign in
fix: consider relocatable data as writable (#570)
49ecc0eLe Tuan
compiler/ghc/default.nix+3
@@ -102,6 +102,9 @@ let
102 GhcRtsHcOpts += -fPIC
102 GhcRtsHcOpts += -fPIC
103 '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
103 '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
104 EXTRA_CC_OPTS += -std=gnu99
104 EXTRA_CC_OPTS += -std=gnu99
105+ '' + stdenv.lib.optionalString useLLVM ''
106+ GhcStage2HcOpts += -fast-llvm
107+ GhcLibHcOpts += -fast-llvm
105 '' + stdenv.lib.optionalString (!enableTerminfo) ''
108 '' + stdenv.lib.optionalString (!enableTerminfo) ''
106 WITH_TERMINFO=NO
109 WITH_TERMINFO=NO
107 ''
110 ''
overlays/bootstrap.nix+1
@@ -107,6 +107,7 @@ in {
107 ++ final.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-reinstallable-lib-ghc.patch
107 ++ final.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-reinstallable-lib-ghc.patch
108 ++ final.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-reinstallable-lib-ghc.patch
108 ++ final.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-reinstallable-lib-ghc.patch
109 ++ final.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-atomic-arm-arch.patch
109 ++ final.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-atomic-arm-arch.patch
110+ ++ final.lib.optional (version == "8.6.5") ./patches/ghc/MR3214-writable-rel-ro-data.patch
110 ++ final.lib.optional (version == "8.8.1") ./patches/ghc/ghc-8.8.1-reinstallable-lib-ghc.patch
111 ++ final.lib.optional (version == "8.8.1") ./patches/ghc/ghc-8.8.1-reinstallable-lib-ghc.patch
111 ++ fromUntil "8.8.2" "8.9" ./patches/ghc/ghc-8.8.2-reinstallable-lib-ghc.patch
112 ++ fromUntil "8.8.2" "8.9" ./patches/ghc/ghc-8.8.2-reinstallable-lib-ghc.patch
112 ++ final.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-better-plusSimplCountErrors.patch
113 ++ final.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-better-plusSimplCountErrors.patch
overlays/patches/ghc/MR3214-writable-rel-ro-data.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/compiler/cmm/Cmm.hs b/compiler/cmm/Cmm.hs
2+index eb34618..f2cc32f 100644
3+--- a/compiler/cmm/Cmm.hs
4++++ b/compiler/cmm/Cmm.hs
5+@@ -181,7 +181,7 @@ isSecConstant :: Section -> Bool
6+ isSecConstant (Section t _) = case t of
7+ Text -> True
8+ ReadOnlyData -> True
9+- RelocatableReadOnlyData -> True
10++ RelocatableReadOnlyData -> False
11+ ReadOnlyData16 -> True
12+ CString -> True
13+ Data -> False