mirror of
https://github.com/termux/termux-packages.git
synced 2025-01-31 21:22:27 +00:00
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
--- a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
|
|
+++ b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
|
|
@@ -285,7 +285,7 @@
|
|
uintptr_t SlabSize = 0;
|
|
uintptr_t CurrentSlabOffset = 0;
|
|
SectionIDMap *SecIDMap = nullptr;
|
|
-#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
|
|
+#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__) && !defined(__ANDROID__)
|
|
unsigned UsedTLSStorage = 0;
|
|
#endif
|
|
};
|
|
@@ -349,7 +349,7 @@
|
|
|
|
// In case the execution needs TLS storage, we define a very small TLS memory
|
|
// area here that will be used in allocateTLSSection().
|
|
-#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
|
|
+#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__) && !defined(__ANDROID__)
|
|
extern "C" {
|
|
alignas(16) __attribute__((visibility("hidden"), tls_model("initial-exec"),
|
|
used)) thread_local char LLVMRTDyldTLSSpace[16];
|
|
@@ -360,7 +360,7 @@
|
|
TrivialMemoryManager::allocateTLSSection(uintptr_t Size, unsigned Alignment,
|
|
unsigned SectionID,
|
|
StringRef SectionName) {
|
|
-#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
|
|
+#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__) && !defined(__ANDROID__)
|
|
if (Size + UsedTLSStorage > sizeof(LLVMRTDyldTLSSpace)) {
|
|
return {};
|
|
}
|