termux-packages/packages/ldc/ldc-druntime-link-symbols.patch
Martin Kinkelin 6d50ac0afd LDC: Upgrade from v1.13 to v1.17 (#4246)
* LDC: Upgrade from v1.13 to v1.17

* LDC: Fix missing symbols in druntime's core.sys.posix.unistd

* LDC: Fix repeated llvm-config help output

* LDC: Revise build script

1) Use an 'installed' (ninja install) LLVM for LDC.
2) Cross-compile LLVM before invoking CMake for LDC, so that the LLVM
   dir is actually populated (previously: just fake bin/llvm-config).
3) Include dlang tools ddemangle and dustmite in the final package too,
   just like official LDC packages. Cmdline flags have been synced with
   upstream.

* Add hello-world smoke test

* LDC: Upgrade LLVM from v7.0.1 to v8.0.1
2019-09-03 20:06:03 +03:00

31 lines
1.3 KiB
Diff

diff --git a/src/rt/sections_android.d b/src/rt/sections_android.d
index 33644151..34a2ae5e 100644
--- a/src/rt/sections_android.d
+++ b/runtime/druntime/src/rt/sections_android.d
@@ -76,7 +76,11 @@ void initSections() nothrow @nogc
_sections.moduleGroup = ModuleGroup(mbeg[0 .. mend - mbeg]);
auto pbeg = cast(void*)&_tlsend;
- auto pend = cast(void*)&__bss_end__;
+ version(X86) auto pend = cast(void*)&_end;
+ else version(X86_64) auto pend = cast(void*)& _end;
+ else version(ARM) auto pend = cast(void*)& __bss_end__;
+ else version(AArch64) auto pend = cast(void*)& __bss_end__;
+ else static assert( false, "Android architecture not supported." );
// _tlsend is a 32-bit int and may not be 64-bit void*-aligned, so align pbeg.
version (D_LP64) pbeg = cast(void*)(cast(size_t)(pbeg + 7) & ~cast(size_t)7);
_sections._gcRanges[0] = pbeg[0 .. pend - pbeg];
@@ -180,7 +184,11 @@ extern(C)
void* __stop_minfo;
}
- size_t __bss_end__;
+ version(X86) size_t _end;
+ else version(X86_64) size_t _end;
+ else version(ARM) size_t __bss_end__;
+ else version(AArch64) size_t __bss_end__;
+ else static assert( false, "Android architecture not supported." );
int _tlsstart;
int _tlsend;