[multiple changes]

2000-06-22  Anthony Williams  <anthony@anthonyw.cjb.net>

	* testsuite/21_strings/find.cc: Patch.

2000-06-22  Benjamin Kosnik  <bkoz@soma.redhat.com>

	* acinclude.m4 (GLIBCPP_CHEC_LINKER_FEATURES): Use gcc + -x c++ as
	an easy way to get at g++ without having to link in libstdc++.

From-SVN: r34649
This commit is contained in:
Benjamin Kosnik 2000-06-22 17:27:57 +00:00
parent 5680375210
commit 5f34904248
5 changed files with 1047 additions and 1057 deletions

View File

@ -1,3 +1,12 @@
2000-06-22 Anthony Williams <anthony@anthonyw.cjb.net>
* testsuite/21_strings/find.cc: Patch.
2000-06-22 Benjamin Kosnik <bkoz@soma.redhat.com>
* acinclude.m4 (GLIBCPP_CHEC_LINKER_FEATURES): Use gcc + -x c++ as
an easy way to get at g++ without having to link in libstdc++.
2000-06-21 Benjamin Kosnik <bkoz@soma.redhat.com>
Fix alpha, powerpc build failures.

View File

@ -255,34 +255,32 @@ dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible
dnl GLIBCPP_CHECK_LINKER_FEATURES
AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
# All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits
# found in GLIBCPP_CONFIGURE.
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
# Need to do this so that g++ won't try to link in libstdc++
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
# Check for -Wl,--gc-sections
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
CXXFLAGS='-Wl,--gc-sections'
AC_TRY_RUN([
int main()
int main(void)
{
try { throw 1; }
catch (...) { };
return 0;
}
], [ac_sectionLDflags=yes], [ac_sectionLFflags=no], [ac_sectionLDflags=yes])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
else
# this is the suspicious part
CXXFLAGS=''
CFLAGS=''
fi
if test "$ac_sectionLDflags" = "yes"; then
SECTION_LDFLAGS='-Wl,--gc-sections'
fi
AC_MSG_RESULT($ac_sectionLDflags)
AC_LANG_RESTORE
AC_SUBST(SECTION_LDFLAGS)
])

View File

@ -267,34 +267,32 @@ dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible
dnl GLIBCPP_CHECK_LINKER_FEATURES
AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
# All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits
# found in GLIBCPP_CONFIGURE.
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
# Need to do this so that g++ won't try to link in libstdc++
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
# Check for -Wl,--gc-sections
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
CXXFLAGS='-Wl,--gc-sections'
AC_TRY_RUN([
int main()
int main(void)
{
try { throw 1; }
catch (...) { };
return 0;
}
], [ac_sectionLDflags=yes], [ac_sectionLFflags=no], [ac_sectionLDflags=yes])
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS"
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
else
# this is the suspicious part
CXXFLAGS=''
CFLAGS=''
fi
if test "$ac_sectionLDflags" = "yes"; then
SECTION_LDFLAGS='-Wl,--gc-sections'
fi
AC_MSG_RESULT($ac_sectionLDflags)
AC_LANG_RESTORE
AC_SUBST(SECTION_LDFLAGS)
])

2055
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -65,6 +65,8 @@ bool test01(void)
csz01 = str01.find(str04, 5);
test &= csz01 == 5;
csz01 = str01.find(str04, str01.size());
test &= csz01 == str01.size();
csz01 = str01.find(str04, str01.size()+1);
test &= csz01 == npos;
// size_type find(const char* s, size_type pos, size_type n) const;
@ -77,7 +79,7 @@ bool test01(void)
csz01 = str01.find(str_lit01);
test &= csz01 == 0;
csz01 = str01.find(str_lit01, 3);
test &= csz01 == 3; // zero length string should be found at pos
test &= csz01 == npos;
// size_type find(char c, size_type pos = 0) const;
csz01 = str01.find('z');