]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
(__thread check): Use AC_LINK_IFELSE, in case of building with compiler support but...
authorRoland McGrath <roland@redhat.com>
Fri, 23 Jan 2009 11:23:02 +0000 (03:23 -0800)
committerRoland McGrath <roland@redhat.com>
Fri, 23 Jan 2009 11:23:02 +0000 (03:23 -0800)
ChangeLog
configure.ac

index b1fb5b99ca15912d6335c1e993f974ca6dfde6d1..c9b6888ebd50d475ec01148c9baff9a60e27dc3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-23  Roland McGrath  <roland@redhat.com>
+
+       * configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
+       building with compiler support but no working runtime support.
+
 2009-01-22  Ulrich Drepper  <drepper@redhat.com>
 
        * Makefile.am (rpm): The tarball is now bzip2-compressed.
index 3dcabbe14592b15672fada4ac7e08011312bae32..657bf50114e1422007e4c24dfeb108d59f8382ce 100644 (file)
@@ -74,12 +74,13 @@ CFLAGS="$old_CFLAGS"])
 AS_IF([test "x$ac_cv_c99" != xyes],
       AC_MSG_ERROR([gcc with C99 support required]))
 
-AC_CACHE_CHECK([for gcc with TLS support], ac_cv_tls, [dnl
-AC_COMPILE_IFELSE([dnl
-__thread int a; int foo (int b) { return a + b; }],
-                 ac_cv_tls=yes, ac_cv_tls=no)])
+AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
+AC_LINK_IFELSE([dnl
+AC_LANG_PROGRAM([[static __thread int a; int foo (int b) { return a + b; }]],
+               [[exit (foo (0));]])],
+              ac_cv_tls=yes, ac_cv_tls=no)])
 AS_IF([test "x$ac_cv_tls" != xyes],
-      AC_MSG_ERROR([gcc with TLS support required]))
+      AC_MSG_ERROR([__thread support required]))
 
 LOCALEDIR=$datadir
 AC_SUBST(LOCALEDIR)