* tls.m4 (GCC_CHECK_TLS): Fall back to a link test.
authorDaniel Jacobowitz <drow@false.org>
Tue, 14 Nov 2006 03:32:36 +0000 (03:32 +0000)
committerDaniel Jacobowitz <drow@false.org>
Tue, 14 Nov 2006 03:32:36 +0000 (03:32 +0000)
config/ChangeLog
config/tls.m4

index 57c31f485df22043dbb4a339d5ccb270801837e9..fda6f95a2cd826bb64f452d613f233ad675a7db7 100644 (file)
@@ -1,3 +1,7 @@
+2006-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * tls.m4 (GCC_CHECK_TLS): Fall back to a link test.
+
 2006-10-14  Geoffrey Keating  <geoffk@apple.com>
 
        * multi.m4: New file, from automake version 2 branch.
index b7a07309abe447ec458dc7e014c44b3c4c5b9331..b66b6d758cecbf96dd259c7f4e923027ac1d7f70 100644 (file)
@@ -13,7 +13,8 @@ AC_DEFUN([GCC_CHECK_TLS], [
                    [have_tls=yes], [have_tls=no], [])
       LDFLAGS="$save_LDFLAGS"],
       [have_tls=no],
-      [AC_COMPILE_IFELSE([__thread int foo;], [have_tls=yes], [have_tls=no])]
+      [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
+       [have_tls=yes], [have_tls=no])]
     )])
   if test "$enable_tls $have_tls" = "yes yes"; then
     AC_DEFINE(HAVE_TLS, 1,