From 597c25e65d1ba0f80796c91f8b1c6318fd353caa Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 13 Nov 2006 20:35:20 +0000 Subject: * tls.m4 (GCC_CHECK_TLS): Fall back to a link test. From-SVN: r118777 --- libstdc++-v3/configure | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'libstdc++-v3/configure') diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index ae9283d..8454849 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -31271,12 +31271,17 @@ if test "${have_tls+set}" = set; then else if test "$cross_compiling" = yes; then - cat >conftest.$ac_ext <<_ACEOF -__thread int foo; + if test x$gcc_no_link = xyes; then + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} + { (exit 1); exit 1; }; } +fi +cat >conftest.$ac_ext <<_ACEOF +__thread int a; int b; int main() { return a = b; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -31290,7 +31295,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -31303,7 +31308,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 have_tls=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF -- cgit v1.1