File tree 6 files changed +66
-6
lines changed
Filter options
6 files changed +66
-6
lines changed
Original file line number Diff line number Diff line change @@ -442,12 +442,12 @@ let
442
442
'' else if stdenv . hostPlatform . isGhcjs then ''
443
443
runHook preBuild
444
444
# https://gitlab.haskell.org/ghc/ghc/issues/9221
445
- $SETUP_HS build ${ haskellLib . componentTarget componentId } ${ lib . concatStringsSep " " setupBuildFlags }
445
+ $SETUP_HS build ${ haskellLib . componentTarget componentId } ${ lib . concatStringsSep " " ( component . setupBuildFlags ++ setupBuildFlags ) }
446
446
runHook postBuild
447
447
'' else ''
448
448
runHook preBuild
449
449
# https://gitlab.haskell.org/ghc/ghc/issues/9221
450
- $SETUP_HS build ${ haskellLib . componentTarget componentId } -j$(($NIX_BUILD_CORES > 4 ? 4 : $NIX_BUILD_CORES)) ${ lib . concatStringsSep " " setupBuildFlags }
450
+ $SETUP_HS build ${ haskellLib . componentTarget componentId } -j$(($NIX_BUILD_CORES > 4 ? 4 : $NIX_BUILD_CORES)) ${ lib . concatStringsSep " " ( component . setupBuildFlags ++ setupBuildFlags ) }
451
451
runHook postBuild
452
452
'' ) ;
453
453
Original file line number Diff line number Diff line change 253
253
'' ;
254
254
} ;
255
255
planned = mkOption {
256
- description = "Set to true by `plan-to-nix` for any component that was included in the `plan.json` file." ;
256
+ description = "Set to true by `plan-to-nix` for any component that was included in the `plan.json` file." ;
257
257
# This is here so that (rather than in componentOptions) so it can be set project wide for stack projects
258
258
type = bool ;
259
259
default = def . planned or false ;
Original file line number Diff line number Diff line change @@ -11,18 +11,27 @@ final: prev: prev.lib.optionalAttrs prev.stdenv.hostPlatform.isAndroid ({
11
11
'' ;
12
12
# my current thinking is that this is due to the android toolchain using r23, api30.
13
13
} ) ;
14
- libffi = prev . libffi . overrideAttrs ( _ : {
14
+ libffi = prev . libffi . overrideAttrs ( old : {
15
15
dontDisableStatic = true ;
16
+ configureFlags = old . configureFlags ++ [ "--disable-shared" ] ;
16
17
17
18
hardeningDisable = [ "fortify" "stackprotector" "format" ] ;
18
19
# see libiconv. We want to target a lower minsdk
19
20
postConfigure = ''
20
21
echo "#undef HAVE_MEMFD_CREATE" >> aarch64-unknown-linux-android/fficonfig.h
21
22
'' ;
22
23
} ) ;
23
- gmp6 = ( prev . gmp6 . override { withStatic = true ; } ) . overrideAttrs ( _ : {
24
+ gmp6 = ( prev . gmp6 . override { withStatic = true ; } ) . overrideAttrs ( old : {
24
25
hardeningDisable = [ "fortify" "stackprotector" "format" ] ;
26
+ configureFlags = old . configureFlags ++ [ "--disable-shared" ] ;
25
27
} ) ;
28
+ zlib = prev . zlib . override { shared = false ; static = true ; } ;
29
+ numactl = prev . numactl . overrideAttrs ( attrs : {
30
+ patches = ( attrs . patches or [ ] ) ++ [ ./patches/numactl-2.0.14-no-librt.patch ] ;
31
+ } ) ;
32
+ openssl = prev . openssl_1_1 ;
26
33
} ) // prev . lib . optionalAttrs prev . stdenv . targetPlatform . isAndroid ( {
27
- bionic = prev . bionic . override { enableStatic = true ; } ;
34
+ # we still need the shared libraries to link against on the platform. GHC
35
+ # has been neutered to not even try loading shared libs and will use dynamic ones.
36
+ bionic = prev . bionic . override { enableStatic = true ; enableShared = true ; } ;
28
37
} )
Original file line number Diff line number Diff line change 227
227
++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . targetPlatform . isAndroid ) ./patches/ghc/ghc-8.10.7-linker-weak-and-common.patch
228
228
++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . targetPlatform . isAndroid ) ./patches/ghc/libc-memory-symbols.patch
229
229
++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . targetPlatform . isAndroid ) ./patches/ghc/android-base-needs-iconv.patch
230
+ ++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . targetPlatform . isAndroid ) ./patches/ghc/ghc-8.10.7-weak-symbols-2.patch
230
231
;
231
232
in ( {
232
233
ghc844 = final . callPackage ../compiler/ghc ( traceWarnOld "8.4" {
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;
Original file line number Diff line number Diff line change
1
+ diff --git a/Makefile.am b/Makefile.am
2
+ index 44d0d76..1181ca5 100644
3
+ --- a/Makefile.am
4
+ +++ b/Makefile.am
5
+ @@ -34,7 +34,7 @@ migratepages_SOURCES = migratepages.c util.c
6
+ migratepages_LDADD = libnuma.la
7
+
8
+ migspeed_SOURCES = migspeed.c util.c
9
+ - migspeed_LDADD = libnuma.la -lrt
10
+ + migspeed_LDADD = libnuma.la
11
+
12
+ memhog_SOURCES = memhog.c util.c
13
+ memhog_LDADD = libnuma.la
You can’t perform that action at this time.
0 commit comments