From d5325238eb0dead53af57fbdf1a8154608513393 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 15 Jul 2004 19:38:42 +0200 Subject: [PATCH] re PR libstdc++/14697 (libstdc++ couldn't find 32bit libgcc_s) PR libstdc++/14697 * acinclude.m4 (glibcxx_shared_libgcc): Correct glibcxx_shared_libgcc test for multilibs. * configure: Rebuilt. From-SVN: r84762 --- libstdc++-v3/ChangeLog | 7 +++++ libstdc++-v3/acinclude.m4 | 17 +++++++++++ libstdc++-v3/configure | 64 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6c8101f2476..39c9e3ebdfb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2004-07-15 Jakub Jelinek + + PR libstdc++/14697 + * acinclude.m4 (glibcxx_shared_libgcc): Correct + glibcxx_shared_libgcc test for multilibs. + * configure: Rebuilt. + 2004-07-14 Paolo Carlini PR libstdc++/16505 diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 2a317e65921..c9be65e0ba7 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1577,6 +1577,23 @@ if test $enable_symvers != no; then CFLAGS=' -lgcc_s' AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes, glibcxx_shared_libgcc=no) CFLAGS="$ac_save_CFLAGS" + if test $glibcxx_shared_libgcc = no; then + cat > conftest.c <&1 >/dev/null \ + | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'` +changequote([,])dnl + rm -f conftest.c conftest.so + if test x${glibcxx_libgcc_s_suffix+set} = xset; then + CFLAGS=" -lgcc_s$glibcxx_libgcc_s_suffix" + AC_TRY_LINK(, [return 0;], glibcxx_shared_libgcc=yes) + CFLAGS="$ac_save_CFLAGS" + fi + fi AC_MSG_RESULT($glibcxx_shared_libgcc) fi diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 12ba7e68c1e..fe0bb85e9f3 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -93676,6 +93676,70 @@ fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" + if test $glibcxx_shared_libgcc = no; then + cat > conftest.c <&1 >/dev/null \ + | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'` + rm -f conftest.c conftest.so + if test x${glibcxx_libgcc_s_suffix+set} = xset; then + CFLAGS=" -lgcc_s$glibcxx_libgcc_s_suffix" + 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 +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +return 0; + ; + 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 + glibcxx_shared_libgcc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + fi + fi echo "$as_me:$LINENO: result: $glibcxx_shared_libgcc" >&5 echo "${ECHO_T}$glibcxx_shared_libgcc" >&6 fi -- 2.30.2