From ff8b8651529810f88f658a5d3a13c72e2f4f5f6a Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 9 Jun 2013 19:34:43 +0400 Subject: [PATCH] Workaround 'unresolved __tls_get_addr' error for Android NDK clang/mips * include/private/thread_local_alloc.h (USE_COMPILER_TLS): Do not use for Android NDK Clang/mips (to workaround "unresolved __tls_get_addr" linker error). --- include/private/thread_local_alloc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/private/thread_local_alloc.h b/include/private/thread_local_alloc.h index b454c8eb..98a9b97a 100644 --- a/include/private/thread_local_alloc.h +++ b/include/private/thread_local_alloc.h @@ -44,7 +44,9 @@ # define USE_WIN32_COMPILER_TLS # endif /* !GNU */ # elif defined(LINUX) && !defined(ARM32) && !defined(AVR32) \ - && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >=3)) + && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) \ + && !(defined(__clang__) && defined(MIPS) && defined(PLATFORM_ANDROID)) + /* As of Android NDK r8e, Clang/mips cannot find __tls_get_addr. */ # define USE_COMPILER_TLS # elif defined(GC_DGUX386_THREADS) || defined(GC_OSF1_THREADS) \ || defined(GC_AIX_THREADS) || defined(GC_DARWIN_THREADS) \ -- 2.40.0