summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@heap.zone>2019-09-01 20:28:09 +0200
committerJonathan Schleifer <js@heap.zone>2019-09-01 20:28:09 +0200
commitf304683e6b64bbcdab76e25d1d25fb82ae59525f (patch)
treedb137e23a1a06090c1a1578376346087cde5c04d
parent3f155d138ce8b417b600e68e998b1bc7474ff71a (diff)
configure: Fix fallback for broken _Thread_local
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d28645f7..cbf0232b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1047,6 +1047,7 @@ AS_IF([test x"$enable_threads" != x"no"], [
AC_MSG_RESULT(yes)
AC_DEFINE(OF_HAVE__THREAD_LOCAL, 1,
[Whether _Thread_local works])
+ have_thread_local="yes"
], [
AC_MSG_RESULT(no)
])
@@ -1055,10 +1056,13 @@ AS_IF([test x"$enable_threads" != x"no"], [
AC_MSG_RESULT(yes)
AC_DEFINE(OF_HAVE__THREAD_LOCAL, 1,
[Whether _Thread_local works])
+ have_thread_local="yes"
])
], [
AC_MSG_RESULT(no)
+ ])
+ AS_IF([test x"$have_thread_local" != x"yes"], [
AC_MSG_CHECKING(whether __thread works)
AC_TRY_LINK([
/* It seems __thread is buggy with GCC 4.1 */