From 218e8bdcb0f52e83ef295eb1661d9b1494fbbbf4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 22 May 2022 16:49:48 +0900 Subject: Disable usage of TLS unless available Thread-local storage is supported since Mac OS X 10.7. Enable TLS only when the target version is enough. --- thread_pthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'thread_pthread.h') diff --git a/thread_pthread.h b/thread_pthread.h index cc1675b77c..b5314082d5 100644 --- a/thread_pthread.h +++ b/thread_pthread.h @@ -92,7 +92,7 @@ struct rb_thread_sched { #if __STDC_VERSION__ >= 201112 #define RB_THREAD_LOCAL_SPECIFIER _Thread_local -#elif defined(__GNUC__) +#elif defined(__GNUC__) && !defined(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED) /* note that ICC (linux) and Clang are covered by __GNUC__ */ #define RB_THREAD_LOCAL_SPECIFIER __thread #else -- cgit v1.2.1