X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=config%2Ftls.m4;h=41f11ab3ea5f1e1f434529876d5bb252d858ff48;hb=aa0752514b9c4c60fa5802cb594738c52d0fef73;hp=b66b6d758cecbf96dd259c7f4e923027ac1d7f70;hpb=7173306d0abdd2cb2eb5d806c3e5caf7e39b995a;p=platform%2Fupstream%2Fbinutils.git diff --git a/config/tls.m4 b/config/tls.m4 index b66b6d7..41f11ab 100644 --- a/config/tls.m4 +++ b/config/tls.m4 @@ -5,12 +5,14 @@ AC_DEFUN([GCC_CHECK_TLS], [ have_tls, [ AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }], [dnl If the test case passed with dynamic linking, try again with - dnl static linking. This fails at least with some older Red Hat - dnl releases. + dnl static linking, but only if static linking is supported (not + dnl on Solaris 10). This fails with some older Red Hat releases. save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" - AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }], - [have_tls=yes], [have_tls=no], []) + AC_LINK_IFELSE([int main() { return 0; }], + AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }], + [have_tls=yes], [have_tls=no],[]), + [have_tls=yes]) LDFLAGS="$save_LDFLAGS"], [have_tls=no], [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],