From: Ivan Maidanski Date: Thu, 11 Jul 2013 12:34:00 +0000 (+0400) Subject: Enable thread-local allocation support for Clang on Cygwin X-Git-Tag: gc7_4_0~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1660ea627695e0efecb0a9c94aaff9b4f923c29d;p=gc 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. --- diff --git a/include/private/thread_local_alloc.h b/include/private/thread_local_alloc.h index 0798863e..82fe2987 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