File tree 4 files changed +61
-0
lines changed
4 files changed +61
-0
lines changed Original file line number Diff line number Diff line change 172
172
SplitSections = NO
173
173
'' + lib . optionalString ( ! enableLibraryProfiling ) ''
174
174
BUILD_PROF_LIBS = NO
175
+ '' + lib . optionalString ( disableLargeAddressSpace ) ''
176
+ libraries/base_CONFIGURE_OPTS += --configure-option=--with-libcharset=no
175
177
'' ;
176
178
177
179
# `--with` flags for libraries needed for RTS linker
198
200
"--enable-dwarf-unwind"
199
201
"--with-libdw-includes=${ lib . getDev elfutils } /include"
200
202
"--with-libdw-libraries=${ lib . getLib elfutils } /lib"
203
+ ] ++ lib . optionals ( targetPlatform . isDarwin ) [
204
+ "--without-libcharset"
201
205
] ;
202
206
203
207
# Splicer will pull out correct variations
Original file line number Diff line number Diff line change 205
205
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/libc-memory-symbols-armv7a.patch
206
206
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/libc-memory-symbols.patch
207
207
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/android-base-needs-iconv.patch
208
+ ++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . stdenv . targetPlatform . isAndroid ) ./patches/ghc/ghc-8.10.7-weak-symbols-2.patch
209
+ ++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . stdenv . targetPlatform . isDarwin && final . stdenv . targetPlatform . isAarch64 ) ./patches/ghc/ghc-8.10.7-rts-aarch64-darwin.patch
208
210
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10-android.patch
209
211
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10.7-android-bionic-symbols.patch
210
212
++ final . lib . optional ( versionAtLeast "8.10.6" && versionLessThan "9.2" && final . stdenv . targetPlatform . isAndroid && final . stdenv . targetPlatform . isAarch32 ) ./patches/ghc/ghc-8.10.7-bionic-libc.patch
Original file line number Diff line number Diff line change
1
+ diff --git a/rts/ghc.mk b/rts/ghc.mk
2
+ index 6d6ff4bb90..02d3c64ce9 100644
3
+ --- a/rts/ghc.mk
4
+ +++ b/rts/ghc.mk
5
+ @@ -415,6 +415,13 @@ rts_CC_OPTS += -fno-strict-aliasing
6
+
7
+ rts_CC_OPTS += -fno-common
8
+
9
+ +
10
+ + ifeq "$(TargetArch_CPP)" "aarch64"
11
+ + ifeq "$(TargetOS_CPP)" "darwin"
12
+ + rts_CC_OPTS += -mcpu=apple-a7 -march=armv8-a+norcpc
13
+ + endif
14
+ + endif
15
+ +
16
+ ifeq "$(BeConservative)" "YES"
17
+ rts_CC_OPTS += -DBE_CONSERVATIVE
18
+ endif
Original file line number Diff line number Diff line change
1
+ diff --git a/rts/Linker.c b/rts/Linker.c
2
+ index 727fe74..12a22d7 100644
3
+ --- a/rts/Linker.c
4
+ +++ b/rts/Linker.c
5
+ @@ -1810,6 +1810,8 @@ static HsInt resolveObjs_ (void)
6
+ IF_DEBUG(linker, debugBelch("resolveObjs: start\n"));
7
+
8
+ for (ObjectCode *oc = objects; oc; oc = oc->next) {
9
+ + if(oc->status == OBJECT_RESOLVED)
10
+ + continue;
11
+ int r = ocTryLoad(oc);
12
+ if (!r)
13
+ {
14
+ diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
15
+ index c3f9110..1b497af 100644
16
+ --- a/rts/linker/Elf.c
17
+ +++ b/rts/linker/Elf.c
18
+ @@ -963,10 +963,15 @@ ocGetNames_ELF ( ObjectCode* oc )
19
+ stab[j].st_size, stab[j].st_value, nm);
20
+ }
21
+ */
22
+ - symbol->addr = (SymbolAddr*)(
23
+ - (intptr_t) oc->sections[secno].start +
24
+ - (intptr_t) symbol->elf_sym->st_value);
25
+ - ASSERT(symbol->addr != 0x0);
26
+ + if(shndx == SHN_UNDEF && ELF_ST_BIND(symbol->elf_sym->st_info) == STB_WEAK) {
27
+ + symbol->addr = NULL;
28
+ + } else {
29
+ + symbol->addr = (SymbolAddr*)(
30
+ + (intptr_t) oc->sections[secno].start +
31
+ + (intptr_t) symbol->elf_sym->st_value);
32
+ + ASSERT(symbol->addr != 0x0);
33
+ + }
34
+ +
35
+ if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL) {
36
+ isLocal = true;
37
+ isWeak = false;
You can’t perform that action at this time.
0 commit comments