From: Ivan Maidanski Date: Sun, 9 Jun 2013 15:34:43 +0000 (+0400) Subject: Workaround 'unresolved __tls_get_addr' error for Android NDK clang/mips X-Git-Tag: gc7_4_0~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff8b8651529810f88f658a5d3a13c72e2f4f5f6a;p=gc 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). --- 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) \