aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-30 14:01:54 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-09 13:54:50 +0900
commit96d1acfdf6c6b42f2029f44d5b5920961d6efa92 (patch)
treeb2a44403f15a840b9e97ec09dbe0defed519b865 /configure.ac
parent2ecdefab7d0f9293f2aaf047bb9c02a612d19a5a (diff)
downloadruby-96d1acfdf6c6b42f2029f44d5b5920961d6efa92.tar.gz
[Bug #19161] Check for TLS usability
On all platforms using GCC, even other than darwin.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 7 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index e2309607ca..3f007f8a40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -366,12 +366,6 @@ AS_CASE(["$target_os"],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([Unsupported OS X version is required])])
- AC_CACHE_CHECK([if thread-local storage is supported], [rb_cv_tls_supported],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int __thread conftest;]])],
- [rb_cv_tls_supported=yes],
- [rb_cv_tls_supported=no])])
- AS_IF([test x"$rb_cv_tls_supported" != xyes],
- [AC_DEFINE(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED)])
])
RUBY_MINGW32
@@ -391,6 +385,13 @@ AS_IF([test "$GCC" = yes], [
AS_IF([test "$gcc_major" -lt 4], [
AC_MSG_ERROR([too old GCC: $gcc_major.$gcc_minor])
])
+
+ AC_CACHE_CHECK([if thread-local storage is supported], [rb_cv_tls_supported],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[int __thread conftest;]])],
+ [rb_cv_tls_supported=yes],
+ [rb_cv_tls_supported=no])])
+ AS_IF([test x"$rb_cv_tls_supported" != xyes],
+ [AC_DEFINE(RB_THREAD_LOCAL_SPECIFIER_IS_UNSUPPORTED)])
], [
linker_flag=
])