From: Roland McGrath Date: Fri, 23 Jan 2009 11:23:02 +0000 (-0800) Subject: (__thread check): Use AC_LINK_IFELSE, in case of building with compiler support but... X-Git-Tag: elfutils-0.140~25^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8181739c44410da185ca2da897e0cc9fb2361c87;p=thirdparty%2Felfutils.git (__thread check): Use AC_LINK_IFELSE, in case of building with compiler support but no working runtime support. --- diff --git a/ChangeLog b/ChangeLog index b1fb5b99c..c9b6888eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-01-23 Roland McGrath + + * 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 * Makefile.am (rpm): The tarball is now bzip2-compressed. diff --git a/configure.ac b/configure.ac index 3dcabbe14..657bf5011 100644 --- a/configure.ac +++ b/configure.ac @@ -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)