]> granicus.if.org Git - gc/commitdiff
Enable thread-local allocation support for Clang on Cygwin
authorIvan Maidanski <ivmai@mail.ru>
Thu, 11 Jul 2013 12:34:00 +0000 (16:34 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 11 Jul 2013 12:34:00 +0000 (16:34 +0400)
* 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.

include/private/thread_local_alloc.h

index 0798863ede9919454b3641663532598d87c6f692..82fe2987133acafc72685616e757c1b1951bd844 100644 (file)
     && !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