[libstdc++] Fix iconv testsuite problems
Phil Edwards
phil@jaj.com
Fri Mar 19 14:38:00 GMT 2004
This is the same thing as Eric's change to gcc/Makefile.in. I don't have
access to a system which needs libiconv.a, but on i686-linux, the testsuite
passes with none of the Expect errors we've been seeing.
Applied to trunk, queued for 3.4.1.
2004-03-19 Phil Edwards <phil@codesourcery.com>
* acinclude.m4 (GLIBCXX_CHECK_WCHAR_T_SUPPORT): Set LIBICONV,
not libiconv. SUBST this variable as well.
* testsuite/Makefile.am (site.exp): New target, based on that
created by automake. Also set libiconv.
* configure, Makefile.in, include/Makefile.in, libmath/Makefile.in,
libsupc++/Makefile.in, po/Makefile.in, src/Makefile.in,
testsuite/Makefile.in: Regenerate.
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.285
diff -u -p -r1.285 acinclude.m4
--- acinclude.m4 17 Mar 2004 08:50:31 -0000 1.285
+++ acinclude.m4 19 Mar 2004 11:26:47 -0000
@@ -336,6 +336,8 @@ dnl
dnl Defines:
dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h
dnl _GLIBCXX_USE_WCHAR_T if all the bits are found.
+dnl Substs:
+dnl LIBICONV to a -l string containing the iconv library, if needed.
dnl
AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT], [
# Test wchar.h for mbstate_t, which is needed for char_traits and
@@ -412,9 +414,10 @@ AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT]
AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
# Check for existence of libiconv.a providing XPG2 wchar_t support.
- AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
+ AC_CHECK_LIB(iconv, iconv, LIBICONV="-liconv")
ac_save_LIBS="$LIBS"
- LIBS="$LIBS $libiconv"
+ LIBS="$LIBS $LIBICONV"
+ AC_SUBST(LIBICONV)
AC_CHECK_FUNCS([iconv_open iconv_close iconv nl_langinfo],
[ac_XPG2funcs=yes], [ac_XPG2funcs=no])
Index: testsuite/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/Makefile.am,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile.am
--- testsuite/Makefile.am 29 Feb 2004 12:57:33 -0000 1.34
+++ testsuite/Makefile.am 19 Mar 2004 11:26:54 -0000
@@ -69,6 +69,32 @@ else
stamp_wchar:
endif
+# We need more things in site.exp, but automake completely controls the
+# creation of that file; there's no way to append to it without messing up
+# the dependancy chains. So we overrule automake. This rule is exactly
+# what it would have generated, plus our own additions.
+site.exp: Makefile
+ @echo 'Making a new site.exp file...'
+ @echo '## these variables are automatically generated by make ##' >site.tmp
+ @echo '# Do not edit here. If you wish to override these values' >>site.tmp
+ @echo '# edit the last section' >>site.tmp
+ @echo 'set srcdir $(srcdir)' >>site.tmp
+ @echo "set objdir `pwd`" >>site.tmp
+ @echo 'set build_alias "$(build_alias)"' >>site.tmp
+ @echo 'set build_triplet $(build_triplet)' >>site.tmp
+ @echo 'set host_alias "$(host_alias)"' >>site.tmp
+ @echo 'set host_triplet $(host_triplet)' >>site.tmp
+ @echo 'set target_alias "$(target_alias)"' >>site.tmp
+ @echo 'set target_triplet $(target_triplet)' >>site.tmp
+ @echo 'set target_triplet $(target_triplet)' >>site.tmp
+ @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
+ @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+ @test ! -f site.exp || \
+ sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+ @-rm -f site.bak
+ @test ! -f site.exp || mv site.exp site.bak
+ @mv site.tmp site.exp
+
# This is automatically run after the generated check-DEJAGNU rule.
check-local: check-abi
More information about the Libstdc++
mailing list