2004-07-13 Jakub Jelinek <jakub@redhat.com>
* acinclude.m4 (glibcxx_shared_libgcc): Correct
glibcxx_shared_libgcc test for multilibs.
* aclocal.m4: Rebuilt.
* configure: Rebuilt.
--- libstdc++-v3/acinclude.m4.jj 2003-01-28 10:51:32.000000000 +0100
+++ libstdc++-v3/acinclude.m4 2004-08-12 14:54:01.657789664 +0200
@@ -2208,6 +2208,23 @@ ac_save_CFLAGS="$CFLAGS"
CFLAGS=' -lgcc_s'
AC_TRY_LINK( , [return 0], glibcpp_shared_libgcc=yes, glibcpp_shared_libgcc=no)
CFLAGS="$ac_save_CFLAGS"
+if test $glibcpp_shared_libgcc = no; then
+ cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+changequote(,)dnl
+ glibcpp_libgcc_s_suffix=`${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
+ -shared -shared-libgcc -o conftest.so \
+ conftest.c -v 2>&1 >/dev/null \
+ | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'`
+changequote([,])dnl
+ rm -f conftest.c conftest.so
+ if test x${glibcpp_libgcc_s_suffix+set} = xset; then
+ CFLAGS=" -lgcc_s$glibcpp_libgcc_s_suffix"
+ AC_TRY_LINK(, [return 0;], glibcpp_shared_libgcc=yes)
+ CFLAGS="$ac_save_CFLAGS"
+ fi
+fi
AC_MSG_RESULT($glibcpp_shared_libgcc)
# For GNU ld, we need at least this version. It's 2.12 in the same format
--- libstdc++-v3/aclocal.m4.jj 2003-02-14 09:30:26.000000000 +0100
+++ libstdc++-v3/aclocal.m4 2004-08-12 14:57:06.460552615 +0200
@@ -2220,6 +2220,23 @@ ac_save_CFLAGS="$CFLAGS"
CFLAGS=' -lgcc_s'
AC_TRY_LINK( , [return 0], glibcpp_shared_libgcc=yes, glibcpp_shared_libgcc=no)
CFLAGS="$ac_save_CFLAGS"
+if test $glibcpp_shared_libgcc = no; then
+ cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+changequote(,)dnl
+ glibcpp_libgcc_s_suffix=`${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
+ -shared -shared-libgcc -o conftest.so \
+ conftest.c -v 2>&1 >/dev/null \
+ | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'`
+changequote([,])dnl
+ rm -f conftest.c conftest.so
+ if test x${glibcpp_libgcc_s_suffix+set} = xset; then
+ CFLAGS=" -lgcc_s$glibcpp_libgcc_s_suffix"
+ AC_TRY_LINK(, [return 0;], glibcpp_shared_libgcc=yes)
+ CFLAGS="$ac_save_CFLAGS"
+ fi
+fi
AC_MSG_RESULT($glibcpp_shared_libgcc)
# For GNU ld, we need at least this version. It's 2.12 in the same format
--- libstdc++-v3/configure.jj 2003-02-14 09:30:58.000000000 +0100
+++ libstdc++-v3/configure 2004-08-12 14:57:49.978961900 +0200
@@ -22090,6 +22090,36 @@ else
fi
rm -f conftest*
CFLAGS="$ac_save_CFLAGS"
+if test $glibcpp_shared_libgcc = no; then
+ cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+ glibcpp_libgcc_s_suffix=`${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
+ -shared -shared-libgcc -o conftest.so \
+ conftest.c -v 2>&1 >/dev/null \
+ | sed -n 's/^.* -lgcc_s\([^ ]*\) .*$/\1/p'`
+ rm -f conftest.c conftest.so
+ if test x${glibcpp_libgcc_s_suffix+set} = xset; then
+ CFLAGS=" -lgcc_s$glibcpp_libgcc_s_suffix"
+ cat > conftest.$ac_ext <<EOF
+#line 22106 "configure"
+#include "confdefs.h"
+
+int main() {
+return 0;
+; return 0; }
+EOF
+if { (eval echo configure:22113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ glibcpp_shared_libgcc=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ CFLAGS="$ac_save_CFLAGS"
+ fi
+fi
echo "$ac_t""$glibcpp_shared_libgcc" 1>&6
# For GNU ld, we need at least this version. It's 2.12 in the same format