From 72a430e4dd7cfa5d104dfc1eb9f76c988bd83b0e Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Mon, 4 Dec 2006 11:10:38 +0000 Subject: [PATCH] config/ * tls.m4 (GCC_CHECK_TLS): Do not test TLS with static linking if static linking doesn't even work. libgomp/ * configure: Regenerate. libmudflap/ * configure: Regenerate. libjava/ * configure: Regenerate. libstdc++-v3/ * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119487 138bc75d-0d04-0410-961f-82ee72b054a4 --- config/ChangeLog | 5 +++++ config/tls.m4 | 10 ++++++---- libgomp/ChangeLog | 4 ++++ libgomp/configure | 37 +++++++++++++++++++++++++++++++++++-- libjava/ChangeLog | 4 ++++ libjava/configure | 42 ++++++++++++++++++++++++++++++++++++++++-- libmudflap/ChangeLog | 4 ++++ libmudflap/configure | 37 +++++++++++++++++++++++++++++++++++-- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/configure | 42 ++++++++++++++++++++++++++++++++++++++++-- 10 files changed, 177 insertions(+), 12 deletions(-) diff --git a/config/ChangeLog b/config/ChangeLog index fda6f95a2cd..88b688ca7fe 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2006-12-04 Eric Botcazou + + * tls.m4 (GCC_CHECK_TLS): Do not test TLS with static linking + if static linking doesn't even work. + 2006-11-13 Daniel Jacobowitz * tls.m4 (GCC_CHECK_TLS): Fall back to a link test. diff --git a/config/tls.m4 b/config/tls.m4 index b66b6d758ce..41f11ab3ea5 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; }], diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 7d6cce68a98..e704b2356f1 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,7 @@ +2006-12-04 Eric Botcazou + + * configure: Regenerate. + 2006-12-04 Jakub Jelinek PR libgomp/29947 diff --git a/libgomp/configure b/libgomp/configure index c35e84d9230..e8b0edabeeb 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -8894,9 +8894,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" - if test "$cross_compiling" = yes; then + cat >conftest.$ac_ext <<_ACEOF +int main() { return 0; } +_ACEOF +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 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling @@ -8928,6 +8953,14 @@ have_tls=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +have_tls=yes +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else echo "$as_me: program exited with status $ac_status" >&5 diff --git a/libjava/ChangeLog b/libjava/ChangeLog index fd1d4ebb2e0..7467727b67c 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2006-12-04 Eric Botcazou + + * configure: Regenerate. + 2006-11-27 Mike Stump * sysdep/x86-64/locks.h: Enable use of either file on either diff --git a/libjava/configure b/libjava/configure index 15f499122aa..4ee87df76f8 100755 --- a/libjava/configure +++ b/libjava/configure @@ -16604,9 +16604,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" - if test "$cross_compiling" = yes; then + 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 +int main() { return 0; } +_ACEOF +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 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling @@ -16638,6 +16668,14 @@ have_tls=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +have_tls=yes +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else echo "$as_me: program exited with status $ac_status" >&5 diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index 131979d1809..1b284719bee 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,7 @@ +2006-12-04 Eric Botcazou + + * configure: Regenerate. + 2006-11-13 Daniel Jacobowitz * configure: Regenerated. diff --git a/libmudflap/configure b/libmudflap/configure index 2e7f260b902..8e9ca412913 100755 --- a/libmudflap/configure +++ b/libmudflap/configure @@ -7183,9 +7183,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" - if test "$cross_compiling" = yes; then + cat >conftest.$ac_ext <<_ACEOF +int main() { return 0; } +_ACEOF +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 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling @@ -7217,6 +7242,14 @@ have_tls=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +have_tls=yes +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else echo "$as_me: program exited with status $ac_status" >&5 diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 21e5347a9b6..4c98bca7aea 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2006-12-04 Eric Botcazou + + * configure: Regenerate. + 2006-12-03 Paolo Carlini PR libstdc++/29989 diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index ae4e09e15dc..0979f650b36 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -31326,9 +31326,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS="$LDFLAGS" LDFLAGS="-static $LDFLAGS" - if test "$cross_compiling" = yes; then + 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 +int main() { return 0; } +_ACEOF +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 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling @@ -31360,6 +31390,14 @@ have_tls=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +have_tls=yes +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else echo "$as_me: program exited with status $ac_status" >&5 -- 2.11.4.GIT