diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2004-10-06 22:12:34 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2004-10-06 22:12:34 +0000 |
commit | e3f78d9b1161f68289db5b09304598bb0ee7d441 (patch) | |
tree | 09d00f21fa64925e280dcf8b8337f681a42ec84f | |
parent | 564060c32aba5494ae02d37a7f005798bb646011 (diff) | |
download | gcc-e3f78d9b1161f68289db5b09304598bb0ee7d441.zip gcc-e3f78d9b1161f68289db5b09304598bb0ee7d441.tar.gz gcc-e3f78d9b1161f68289db5b09304598bb0ee7d441.tar.bz2 |
acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread.
2004-10-06 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread.
(GLIBCXX_CONFIGURE_TESTSUITE): Use it.
* configure: Regenerated.
* testsuite/Makefile.am (CLEANFILES): Add TEST for
check-performance executables.
(stamp_thread): New.
(all-local): Use it.
* testsuite/Makefile.in: Regenerate.
* scripts/create_testsuite_files: Filter thread tests.
* testsuite/thread/pthread1.cc: Remove macro conditionals: this
file will only be run by thread enabled configurations.
* testsuite/thread/pthread7-rope.cc: Same, add rope_type typedef.
* testsuite/thread/pthread6.cc: Same.
* testsuite/thread/pthread5.cc: Same.
* testsuite/thread/pthread4.cc: Same.
* testsuite/thread/pthread3.cc: Same.
* testsuite/thread/pthread2.cc: Same.
* testsuite/ext/mt_allocator/instantiate.cc: Add in __GTHREADS guard.
* testsuite/ext/mt_allocator/deallocate_global-1.cc: Move to...
* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: ...here.
* testsuite/ext/mt_allocator/deallocate_global-3.cc: Move to...
* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: ...here.
* testsuite/ext/mt_allocator/deallocate_local-1.cc: Move to...
* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: ...here.
* testsuite/ext/mt_allocator/deallocate_local-3.cc: Move to...
* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: ...here.
From-SVN: r88628
24 files changed, 112 insertions, 48 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c87cda9..34fea61 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,4 +1,35 @@ 2004-10-06 Benjamin Kosnik <bkoz@redhat.com> + + * acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread. + (GLIBCXX_CONFIGURE_TESTSUITE): Use it. + * configure: Regenerated. + * testsuite/Makefile.am (CLEANFILES): Add TEST for + check-performance executables. + (stamp_thread): New. + (all-local): Use it. + * testsuite/Makefile.in: Regenerate. + * scripts/create_testsuite_files: Filter thread tests. + + * testsuite/thread/pthread1.cc: Remove macro conditionals: this + file will only be run by thread enabled configurations. + * testsuite/thread/pthread7-rope.cc: Same, add rope_type typedef. + * testsuite/thread/pthread6.cc: Same. + * testsuite/thread/pthread5.cc: Same. + * testsuite/thread/pthread4.cc: Same. + * testsuite/thread/pthread3.cc: Same. + * testsuite/thread/pthread2.cc: Same. + + * testsuite/ext/mt_allocator/instantiate.cc: Add in __GTHREADS guard. + * testsuite/ext/mt_allocator/deallocate_global-1.cc: Move to... + * testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: ...here. + * testsuite/ext/mt_allocator/deallocate_global-3.cc: Move to... + * testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: ...here. + * testsuite/ext/mt_allocator/deallocate_local-1.cc: Move to... + * testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: ...here. + * testsuite/ext/mt_allocator/deallocate_local-3.cc: Move to... + * testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: ...here. + +2004-10-06 Benjamin Kosnik <bkoz@redhat.com> Paolo Carlini <pcarlini@suse.de> PR libstdc++/17780 diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in index a25d559..06d8eaf 100644 --- a/libstdc++-v3/Makefile.in +++ b/libstdc++-v3/Makefile.in @@ -150,6 +150,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 6c9f13a..0bd4aa6 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -620,6 +620,8 @@ dnl GLIBCXX_ENABLE_SYMVERS and GLIBCXX_IS_NATIVE must be done before this. dnl dnl Sets: dnl enable_abi_check / GLIBCXX_TEST_ABI +dnl GLIBCXX_TEST_WCHAR_T +dnl GLIBCXX_TEST_THREAD dnl Substs: dnl baseline_dir dnl @@ -652,6 +654,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE_TESTSUITE], [ AC_SUBST(baseline_dir) GLIBCXX_CONDITIONAL(GLIBCXX_TEST_WCHAR_T, test $enable_wchar_t = yes) + GLIBCXX_CONDITIONAL(GLIBCXX_TEST_THREAD, test $enable_thread = yes) GLIBCXX_CONDITIONAL(GLIBCXX_TEST_ABI, test $enable_abi_check = yes) ]) @@ -1708,8 +1711,10 @@ AC_DEFUN([GLIBCXX_ENABLE_THREADS], [ target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'` AC_MSG_RESULT([$target_thread_file]) + enable_thread=no if test $target_thread_file != single; then AC_DEFINE(HAVE_GTHR_DEFAULT) + enable_thread=yes fi glibcxx_thread_h=gthr-$target_thread_file.h diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 0a8f404..8fe56ec 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CCODECVT_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE glibcxx_thread_h DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libtool_VERSION multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar glibcxx_builddir glibcxx_srcdir toplevel_srcdir CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LN_S AS ac_ct_AS AR ac_ct_AR RANLIB ac_ct_RANLIB MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBTOOL CXXCPP CPPFLAGS enable_shared enable_static GLIBCXX_HOSTED_TRUE GLIBCXX_HOSTED_FALSE GLIBCXX_BUILD_PCH_TRUE GLIBCXX_BUILD_PCH_FALSE glibcxx_PCHFLAGS CSTDIO_H BASIC_FILE_H BASIC_FILE_CC CPP EGREP check_msgfmt glibcxx_MOFILES glibcxx_POFILES glibcxx_localedir USE_NLS CLOCALE_H CCODECVT_H CMESSAGES_H CCODECVT_CC CCOLLATE_CC CCTYPE_CC CMESSAGES_CC CMONEY_CC CNUMERIC_CC CTIME_H CTIME_CC CLOCALE_CC CLOCALE_INTERNAL_H ALLOCATOR_H ALLOCATOR_NAME C_INCLUDE_DIR GLIBCXX_C_HEADERS_C_TRUE GLIBCXX_C_HEADERS_C_FALSE GLIBCXX_C_HEADERS_C_STD_TRUE GLIBCXX_C_HEADERS_C_STD_FALSE GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE GLIBCXX_C_HEADERS_COMPATIBILITY_FALSE glibcxx_thread_h DEBUG_FLAGS GLIBCXX_BUILD_DEBUG_TRUE GLIBCXX_BUILD_DEBUG_FALSE EXTRA_CXX_FLAGS WERROR SECTION_FLAGS SECTION_LDFLAGS OPT_LDFLAGS LIBMATHOBJS LIBICONV SYMVER_MAP port_specific_symbol_files GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE baseline_dir GLIBCXX_TEST_WCHAR_T_TRUE GLIBCXX_TEST_WCHAR_T_FALSE GLIBCXX_TEST_THREAD_TRUE GLIBCXX_TEST_THREAD_FALSE GLIBCXX_TEST_ABI_TRUE GLIBCXX_TEST_ABI_FALSE ATOMICITY_SRCDIR ATOMIC_WORD_SRCDIR ABI_TWEAKS_SRCDIR OS_INC_SRCDIR glibcxx_prefixdir gxx_include_dir glibcxx_toolexecdir glibcxx_toolexeclibdir GLIBCXX_INCLUDES TOPLEVEL_INCLUDES OPTIMIZE_CXXFLAGS WARN_FLAGS LIBSUPCXX_PICFLAGS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -7728,11 +7728,13 @@ echo $ECHO_N "checking for thread model used by GCC... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $target_thread_file" >&5 echo "${ECHO_T}$target_thread_file" >&6 + enable_thread=no if test $target_thread_file != single; then cat >>confdefs.h <<\_ACEOF #define HAVE_GTHR_DEFAULT 1 _ACEOF + enable_thread=yes fi glibcxx_thread_h=gthr-$target_thread_file.h @@ -97355,6 +97357,7 @@ done + # Propagate the target-specific source directories through the build chain. ATOMICITY_SRCDIR=config/${atomicity_dir} ATOMIC_WORD_SRCDIR=config/${atomic_word_dir} @@ -97460,6 +97463,17 @@ fi +if test $enable_thread = yes; then + GLIBCXX_TEST_THREAD_TRUE= + GLIBCXX_TEST_THREAD_FALSE='#' +else + GLIBCXX_TEST_THREAD_TRUE='#' + GLIBCXX_TEST_THREAD_FALSE= +fi + + + + if test $enable_abi_check = yes; then GLIBCXX_TEST_ABI_TRUE= GLIBCXX_TEST_ABI_FALSE='#' @@ -97828,6 +97842,13 @@ echo "$as_me: error: conditional \"GLIBCXX_TEST_WCHAR_T\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${GLIBCXX_TEST_THREAD_TRUE}" && test -z "${GLIBCXX_TEST_THREAD_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_TEST_THREAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GLIBCXX_TEST_THREAD\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${GLIBCXX_TEST_ABI_TRUE}" && test -z "${GLIBCXX_TEST_ABI_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GLIBCXX_TEST_ABI\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -98508,6 +98529,8 @@ s,@GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE@,$GLIBCXX_BUILD_VERSIONED_SHLIB_FALSE,;t s,@baseline_dir@,$baseline_dir,;t t s,@GLIBCXX_TEST_WCHAR_T_TRUE@,$GLIBCXX_TEST_WCHAR_T_TRUE,;t t s,@GLIBCXX_TEST_WCHAR_T_FALSE@,$GLIBCXX_TEST_WCHAR_T_FALSE,;t t +s,@GLIBCXX_TEST_THREAD_TRUE@,$GLIBCXX_TEST_THREAD_TRUE,;t t +s,@GLIBCXX_TEST_THREAD_FALSE@,$GLIBCXX_TEST_THREAD_FALSE,;t t s,@GLIBCXX_TEST_ABI_TRUE@,$GLIBCXX_TEST_ABI_TRUE,;t t s,@GLIBCXX_TEST_ABI_FALSE@,$GLIBCXX_TEST_ABI_FALSE,;t t s,@ATOMICITY_SRCDIR@,$ATOMICITY_SRCDIR,;t t diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index b6f4be7..bc35f0c 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -117,6 +117,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/libmath/Makefile.in b/libstdc++-v3/libmath/Makefile.in index 87b0dae..03b598b 100644 --- a/libstdc++-v3/libmath/Makefile.in +++ b/libstdc++-v3/libmath/Makefile.in @@ -134,6 +134,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index 765d4c9..9c622e0 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -173,6 +173,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in index 3694b33..edd8f27 100644 --- a/libstdc++-v3/po/Makefile.in +++ b/libstdc++-v3/po/Makefile.in @@ -117,6 +117,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/scripts/create_testsuite_files b/libstdc++-v3/scripts/create_testsuite_files index 50f2e13..582f8f5 100755 --- a/libstdc++-v3/scripts/create_testsuite_files +++ b/libstdc++-v3/scripts/create_testsuite_files @@ -47,15 +47,22 @@ else grep -v wchar_t $tmp.1 > $tmp.2 fi +# If the library is not configured to support threads, don't run those tests. +if test -f "$outdir/testsuite_thread"; then + mv $tmp.2 $tmp.3 +else + grep -v thread $tmp.2 > $tmp.3 +fi + # Now filter out classes of tests. These classes are run using special rules. -grep _xin $tmp.2 > $tests_file_inter -grep -v _xin $tmp.2 > $tmp.3 +grep _xin $tmp.3 > $tests_file_inter +grep -v _xin $tmp.3 > $tmp.4 -grep performance $tmp.3 > $tests_file_perf -grep -v performance $tmp.3 > $tmp.4 +grep performance $tmp.4 > $tests_file_perf +grep -v performance $tmp.4 > $tmp.5 # ...more filters go here. -cp $tmp.4 $tests_file_normal +cp $tmp.5 $tests_file_normal rm $tmp* exit 0 diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 9164452..ba9df3c 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -152,6 +152,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am index 9e11ac3..a003497 100644 --- a/libstdc++-v3/testsuite/Makefile.am +++ b/libstdc++-v3/testsuite/Makefile.am @@ -57,7 +57,7 @@ endif abi_check_SOURCES = abi_check.cc abi_check_DEPENDENCIES = libv3test.a -all-local: stamp_wchar testsuite_files +all-local: stamp_wchar stamp_thread testsuite_files # Enable wchar_t tests if capable. if GLIBCXX_TEST_WCHAR_T @@ -67,6 +67,14 @@ else stamp_wchar: endif +# Enable thread tests if capable. +if GLIBCXX_TEST_THREAD +stamp_thread: + touch testsuite_thread +else +stamp_thread: +endif + # Generated lists of files to run. All of these names are valid make # targets, if you wish to generate a list manually. lists_of_files = \ @@ -183,4 +191,4 @@ check-script check-script-install check-performance # By adding these files here, automake will remove them for 'make clean' CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ - testsuite_* site.exp abi_check baseline_symbols + testsuite_* site.exp abi_check baseline_symbols *TEST* diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index 3a79b7e..1005b34 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -146,6 +146,8 @@ GLIBCXX_HOSTED_TRUE = @GLIBCXX_HOSTED_TRUE@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_TEST_ABI_FALSE = @GLIBCXX_TEST_ABI_FALSE@ GLIBCXX_TEST_ABI_TRUE = @GLIBCXX_TEST_ABI_TRUE@ +GLIBCXX_TEST_THREAD_FALSE = @GLIBCXX_TEST_THREAD_FALSE@ +GLIBCXX_TEST_THREAD_TRUE = @GLIBCXX_TEST_THREAD_TRUE@ GLIBCXX_TEST_WCHAR_T_FALSE = @GLIBCXX_TEST_WCHAR_T_FALSE@ GLIBCXX_TEST_WCHAR_T_TRUE = @GLIBCXX_TEST_WCHAR_T_TRUE@ INSTALL_DATA = @INSTALL_DATA@ @@ -311,7 +313,7 @@ performance_script = ${glibcxx_srcdir}/scripts/check_performance # By adding these files here, automake will remove them for 'make clean' CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \ - testsuite_* site.exp abi_check baseline_symbols + testsuite_* site.exp abi_check baseline_symbols *TEST* all: all-am @@ -575,13 +577,18 @@ uninstall-am: uninstall-info-am tags uninstall uninstall-am uninstall-info-am -all-local: stamp_wchar testsuite_files +all-local: stamp_wchar stamp_thread testsuite_files # Enable wchar_t tests if capable. @GLIBCXX_TEST_WCHAR_T_TRUE@stamp_wchar: @GLIBCXX_TEST_WCHAR_T_TRUE@ touch testsuite_wchar_t @GLIBCXX_TEST_WCHAR_T_FALSE@stamp_wchar: +# Enable thread tests if capable. +@GLIBCXX_TEST_THREAD_TRUE@stamp_thread: +@GLIBCXX_TEST_THREAD_TRUE@ touch testsuite_thread +@GLIBCXX_TEST_THREAD_FALSE@stamp_thread: + # 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 diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-1.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc index 1f0ac28..1f0ac28 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-1.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-3.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc index 10efea6..10efea6 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-3.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-1.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc index 5664d3c..5664d3c 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-1.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-3.cc b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc index 973f758..973f758 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-3.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc b/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc index 579b8bc..4fa49aa 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/instantiate.cc @@ -27,7 +27,9 @@ using namespace __gnu_cxx; template class __mt_alloc<int>; -template class __mt_alloc<short, __common_pool_policy<true> >; template class __mt_alloc<short, __common_pool_policy<false> >; -template class __mt_alloc<short, __per_type_pool_policy<short, true> >; template class __mt_alloc<short, __per_type_pool_policy<short, false> >; +#ifdef __GTHREADS +template class __mt_alloc<short, __common_pool_policy<true> >; +template class __mt_alloc<short, __per_type_pool_policy<short, true> >; +#endif diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc index 1b225f2..26d198a 100644 --- a/libstdc++-v3/testsuite/thread/pthread1.cc +++ b/libstdc++-v3/testsuite/thread/pthread1.cc @@ -34,7 +34,6 @@ // Do not include <pthread.h> explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS using namespace std; const int thread_cycles = 10; @@ -135,6 +134,3 @@ main () return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread2.cc b/libstdc++-v3/testsuite/thread/pthread2.cc index 7fbdfc0..7a0efd0 100644 --- a/libstdc++-v3/testsuite/thread/pthread2.cc +++ b/libstdc++-v3/testsuite/thread/pthread2.cc @@ -28,8 +28,6 @@ // Do not include <pthread.h> explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS - const int max_thread_count = 2; const int max_loop_count = 1000000; @@ -62,6 +60,3 @@ main() return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread3.cc b/libstdc++-v3/testsuite/thread/pthread3.cc index ca8f771..4696fb7 100644 --- a/libstdc++-v3/testsuite/thread/pthread3.cc +++ b/libstdc++-v3/testsuite/thread/pthread3.cc @@ -28,8 +28,6 @@ // Do not include <pthread.h> explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS - const int max_thread_count = 2; const int max_loop_count = 1000000; @@ -59,6 +57,3 @@ main() return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread4.cc b/libstdc++-v3/testsuite/thread/pthread4.cc index be1ae68..a9ec9b8 100644 --- a/libstdc++-v3/testsuite/thread/pthread4.cc +++ b/libstdc++-v3/testsuite/thread/pthread4.cc @@ -30,7 +30,6 @@ // Do not include <pthread.h> explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS using namespace std; static list<string> foo; @@ -113,6 +112,3 @@ main (void) return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc index b950542..93f03a2 100644 --- a/libstdc++-v3/testsuite/thread/pthread5.cc +++ b/libstdc++-v3/testsuite/thread/pthread5.cc @@ -31,7 +31,6 @@ // Do not include <pthread.h> explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS #ifdef _GLIBCXX_HAVE_UNISTD_H #include <unistd.h> // To test for _POSIX_THREAD_PRIORITY_SCHEDULING #endif @@ -130,6 +129,3 @@ main () return (0); } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc index e0fee71..ba8c341 100644 --- a/libstdc++-v3/testsuite/thread/pthread6.cc +++ b/libstdc++-v3/testsuite/thread/pthread6.cc @@ -30,8 +30,6 @@ // Do not include <pthread.h> explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS - const int max_thread_count = 8; const int loops = 100000; @@ -94,6 +92,3 @@ main (void) return 0; } -#else -int main (void) {} -#endif diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc index 2f40134..307973c 100644 --- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc +++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc @@ -29,13 +29,12 @@ // Do not include <pthread.h> explicitly; if threads are properly // configured for the port, then it is picked up free from STL headers. -#if __GTHREADS - const int max_thread_count = 4; const int max_loop_count = 10000; -__gnu_cxx::crope foo2; -__gnu_cxx::crope foo4; +typedef __gnu_cxx::rope<char, std::allocator<char> > rope_type; +rope_type foo2; +rope_type foo4; void* thread_main(void *) { @@ -73,7 +72,7 @@ main() pthread_setconcurrency (max_thread_count); #endif - __gnu_cxx::crope foo; + rope_type foo; foo += "bar"; foo += "baz"; foo += "bongle"; @@ -89,7 +88,7 @@ main() VERIFY( !std::strcmp (data2, "bar2baz2bongle2") ); } - __gnu_cxx::crope foo3 ("hello"); + rope_type foo3 ("hello"); const char* data3 = foo3.c_str(); VERIFY( !std::strcmp (data3, "hello") ); @@ -112,6 +111,3 @@ main() return 0; } -#else -int main (void) {} -#endif |