From 96d1acfdf6c6b42f2029f44d5b5920961d6efa92 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 30 Nov 2022 14:01:54 +0900 Subject: [Bug #19161] Check for TLS usability On all platforms using GCC, even other than darwin. --- configure.ac | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'configure.ac') 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= ]) -- cgit v1.2.1