summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2013-07-11 14:34:00 +0200
committerIvan Maidanski <ivmai@mail.ru>2013-07-11 14:34:00 +0200
commit1660ea627695e0efecb0a9c94aaff9b4f923c29d (patch)
tree31e2d27a9bd69ceb75a09a077214c8c0329b60b2
parent6da20ac5b44b55dfa905bd87f41063bd58e65087 (diff)
Enable thread-local allocation support for Clang on Cygwin
* include/private/thread_local_alloc.h (USE_PTHREAD_SPECIFIC): Use (instead of USE_COMPILER_TLS) for clang3.1/x86 cygwin to workaround "thread-local storage is unsupported for the current target" error.
-rw-r--r--include/private/thread_local_alloc.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/private/thread_local_alloc.h b/include/private/thread_local_alloc.h
index 0798863..82fe298 100644
--- a/include/private/thread_local_alloc.h
+++ b/include/private/thread_local_alloc.h
@@ -37,7 +37,12 @@
&& !defined(USE_CUSTOM_SPECIFIC)
# if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
# if defined(CYGWIN32) && (__GNUC__ >= 4)
-# define USE_COMPILER_TLS
+# if defined(__clang__)
+ /* As of Cygwin clang3.1, thread-local storage is unsupported. */
+# define USE_PTHREAD_SPECIFIC
+# else
+# define USE_COMPILER_TLS
+# endif
# elif defined(__GNUC__) || defined(MSWINCE)
# define USE_WIN32_SPECIFIC
# else