summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2010-07-09 12:09:07 +0300
committerM Joonas Pihlaja <jpihlaja@cc.helsinki.fi>2010-07-21 23:52:22 +0300
commiteb247ac377623d2a722aab1e6eae7adab5f7ebea (patch)
tree63dd2cbe6b900b4898c9605ad18100e820018f4c
parentdbf35f1f276a673bc4a1eb932dd5cf9266f948da (diff)
Don't trust OpenBSD's gcc to produce working code for __thread.
The gcc on OpenBSD 4.5 to 4.7 at least produces bad code for __thread, without as much as a warning. See PR #6410 "Using __thread TLS variables compiles ok but segfault at runtime." http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6410
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b9488d92..3c6f01d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -531,6 +531,9 @@ AC_LINK_IFELSE([
#ifdef __MINGW32__
#error MinGW has broken __thread support
#endif
+#ifdef __OpenBSD__
+#error OpenBSD has broken __thread support
+#endif
static __thread int x ;
int main () { x = 123; return x; }
], support_for__thread=yes)