From 0676e9308d8a96b0cefa5d59f2c8aa360e3cbf67 Mon Sep 17 00:00:00 2001
From: Benjamin Kosnik <bkoz@redhat.com>
Date: Wed, 18 Jun 2003 01:52:08 +0000
Subject: [PATCH] scripts: New.

2003-06-17  Benjamin Kosnik  <bkoz@redhat.com>

	* scripts: New.
	* config/abi/extract_symvers: Move to...
	* scripts/extract_symvers: ...here.
	* mkcheck.in: Move to..
	* scripts/check_survey.in: ...here.
	* testsuite_flags.in: Move to..
	* scripts/testsuite_flags.in: ...here.
	* configure.in: Change check and testsuite_flags locations.
	* configure: Regenerate.
	* testsuite/Makefile.am (current_symbols.txt): Change location.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Modify
	location of testsuite_flags.
	* Makefile.am (check-script): Move..
	(check-script-install): Move...
	* testsuite/Makefile.am: ... here.
	* testsuite/Makefile.in: Regenerate.
	* Makefile.in: Regenerate.

From-SVN: r68132
---
 libstdc++-v3/ChangeLog                        | 21 ++++++++++
 libstdc++-v3/Makefile.am                      | 15 -------
 libstdc++-v3/Makefile.in                      | 24 +----------
 libstdc++-v3/configure                        |  8 ++--
 libstdc++-v3/configure.in                     | 12 +++---
 .../{mkcheck.in => scripts/check_survey.in}   | 35 +++++++---------
 .../{config/abi => scripts}/extract_symvers   |  0
 libstdc++-v3/{ => scripts}/testsuite_flags.in |  0
 libstdc++-v3/testsuite/Makefile.am            | 40 +++++++++++++++---
 libstdc++-v3/testsuite/Makefile.in            | 42 +++++++++++++++----
 .../testsuite/lib/libstdc++-v3-dg.exp         |  2 +-
 11 files changed, 118 insertions(+), 81 deletions(-)
 rename libstdc++-v3/{mkcheck.in => scripts/check_survey.in} (94%)
 rename libstdc++-v3/{config/abi => scripts}/extract_symvers (100%)
 rename libstdc++-v3/{ => scripts}/testsuite_flags.in (100%)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4973da0cb390..0fbe71a711cf 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,24 @@
+2003-06-17  Benjamin Kosnik  <bkoz@redhat.com>
+
+	* scripts: New.
+	* config/abi/extract_symvers: Move to...
+	* scripts/extract_symvers: ...here.
+	* mkcheck.in: Move to..
+	* scripts/check_survey.in: ...here.
+	* testsuite_flags.in: Move to..
+	* scripts/testsuite_flags.in: ...here.
+	* configure.in: Change check and testsuite_flags locations.
+	* configure: Regenerate.
+	* testsuite/Makefile.am (current_symbols.txt): Change location.
+	* testsuite/Makefile.in: Regenerate.
+	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Modify
+	location of testsuite_flags.
+	* Makefile.am (check-script): Move..
+	(check-script-install): Move...
+	* testsuite/Makefile.am: ... here.	
+	* testsuite/Makefile.in: Regenerate.
+	* Makefile.in: Regenerate.	
+	
 2003-06-17  Benjamin Kosnik  <bkoz@redhat.com>
 
 	* config/abi/i486-linux-gnu/baseline_symbols.txt: Update to 3.3.0.
diff --git a/libstdc++-v3/Makefile.am b/libstdc++-v3/Makefile.am
index 58edd36937ae..2467ce3d7b88 100644
--- a/libstdc++-v3/Makefile.am
+++ b/libstdc++-v3/Makefile.am
@@ -31,21 +31,6 @@ mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
 
 PWD = $${PWDCMD-pwd}
 
-# These two special 'check-script' rules use the bash script 'mkcheck'
-# to do testing. This script is not as portable as the dejagnu test
-# harness, and is thus off by default. It does produce interesting
-# output however, including various performance analysis items like
-# compile time, execution time, and binary size.
-check-script: $(top_builddir)/mkcheck
-	-(chmod + $(top_builddir)/mkcheck; \
-	  cd testsuite; \
-	  @glibcpp_builddir@/mkcheck 0)
-
-check-script-install: $(top_builddir)/mkcheck
-	-(chmod + $(top_builddir)/mkcheck; \
-	  cd testsuite; \
-	  @glibcpp_builddir@/mkcheck 1)
-
 # These rules are messy, but are hella worth it.
 doxygen:
 	-(srcdir=`cd ${top_srcdir}; ${PWD}`; \
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in
index cdd497cac6dd..956585bc26f6 100644
--- a/libstdc++-v3/Makefile.in
+++ b/libstdc++-v3/Makefile.in
@@ -210,10 +210,9 @@ AM_MAKEFLAGS = \
 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =  mkcheck testsuite_flags
+CONFIG_CLEAN_FILES = 
 DIST_COMMON =  README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in \
-mkcheck.in testsuite_flags.in
+acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in
 
 
 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -264,10 +263,6 @@ distclean-hdr:
 	-rm -f config.h
 
 maintainer-clean-hdr:
-mkcheck: $(top_builddir)/config.status mkcheck.in
-	cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-testsuite_flags: $(top_builddir)/config.status testsuite_flags.in
-	cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -479,21 +474,6 @@ distclean-generic clean-generic maintainer-clean-generic clean \
 mostlyclean distclean maintainer-clean
 
 
-# These two special 'check-script' rules use the bash script 'mkcheck'
-# to do testing. This script is not as portable as the dejagnu test
-# harness, and is thus off by default. It does produce interesting
-# output however, including various performance analysis items like
-# compile time, execution time, and binary size.
-check-script: $(top_builddir)/mkcheck
-	-(chmod + $(top_builddir)/mkcheck; \
-	  cd testsuite; \
-	  @glibcpp_builddir@/mkcheck 0)
-
-check-script-install: $(top_builddir)/mkcheck
-	-(chmod + $(top_builddir)/mkcheck; \
-	  cd testsuite; \
-	  @glibcpp_builddir@/mkcheck 1)
-
 # These rules are messy, but are hella worth it.
 doxygen:
 	-(srcdir=`cd ${top_srcdir}; ${PWD}`; \
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index a6b7b9102645..2323757ce138 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -23968,7 +23968,7 @@ ac_given_INSTALL="$INSTALL"
 trap 'rm -fr `echo "Makefile \
 include/Makefile src/Makefile \
 libmath/Makefile libsupc++/Makefile \
-po/Makefile testsuite/Makefile mkcheck testsuite_flags config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+po/Makefile testsuite/Makefile scripts/check scripts/testsuite_flags config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -24162,7 +24162,7 @@ cat >> $CONFIG_STATUS <<EOF
 CONFIG_FILES=\${CONFIG_FILES-"Makefile \
 include/Makefile src/Makefile \
 libmath/Makefile libsupc++/Makefile \
-po/Makefile testsuite/Makefile mkcheck testsuite_flags"}
+po/Makefile testsuite/Makefile scripts/check scripts/testsuite_flags"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -24369,8 +24369,8 @@ test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
      esac
    fi
  fi
- chmod +x mkcheck
- chmod +x testsuite_flags
+ chmod +x scripts/check
+ chmod +x scripts/testsuite_flags
 exit 0
 EOF
 chmod +x $CONFIG_STATUS
diff --git a/libstdc++-v3/configure.in b/libstdc++-v3/configure.in
index f7ff247602b8..62a972f999d5 100644
--- a/libstdc++-v3/configure.in
+++ b/libstdc++-v3/configure.in
@@ -485,7 +485,7 @@ AC_SUBST(LIBSUPCXX_PICFLAGS)
 AC_OUTPUT(Makefile \
 include/Makefile src/Makefile \
 libmath/Makefile libsupc++/Makefile \
-po/Makefile testsuite/Makefile mkcheck testsuite_flags,
+po/Makefile testsuite/Makefile scripts/check scripts/testsuite_flags,
 [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
  if test -n "$CONFIG_FILES"; then
    if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
@@ -508,8 +508,8 @@ po/Makefile testsuite/Makefile mkcheck testsuite_flags,
      esac
    fi
  fi
- chmod +x mkcheck
- chmod +x testsuite_flags],
+ chmod +x scripts/check
+ chmod +x scripts/testsuite_flags],
 srcdir=${srcdir}
 host=${host}
 target=${target}
@@ -527,7 +527,7 @@ dnl  In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros:
 dnl  AC_CONFIG_FILES(Makefile \
 dnl      include/Makefile src/Makefile \
 dnl      libmath/Makefile libsupc++/Makefile \
-dnl      po/Makefile testsuite/Makefile mkcheck testsuite_flags)
+dnl     po/Makefile testsuite/Makefile scripts/mkcheck scripts/testsuite_flags)
 dnl  AC_CONFIG_COMMANDS([default],
 dnl  [if test -n "$CONFIG_FILES"; then
 dnl    # Ony modify Makefiles that are just being created.
@@ -547,8 +547,8 @@ dnl        grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
 dnl        ;;
 dnl    esac
 dnl  fi
-dnl  chmod +x mkcheck
-dnl  chmod +x testsuite_flags
+dnl  chmod +x scripts/mkcheck
+dnl  chmod +x scripts/testsuite_flags
 dnl  ],
 dnl  srcdir=${srcdir}
 dnl  host=${host}
diff --git a/libstdc++-v3/mkcheck.in b/libstdc++-v3/scripts/check_survey.in
similarity index 94%
rename from libstdc++-v3/mkcheck.in
rename to libstdc++-v3/scripts/check_survey.in
index 377321cac43a..3baad37229ff 100755
--- a/libstdc++-v3/mkcheck.in
+++ b/libstdc++-v3/scripts/check_survey.in
@@ -8,7 +8,7 @@
 # has been enabled.
 
 # Invocation 
-# mkcheck [01] 
+# check_survey [01] 
 
 # 1: variables
 #
@@ -17,14 +17,14 @@
 # (1) testing the installed binary and headers, or
 WHICH=$1
 if [ "$WHICH"x = 0x ]; then
-  echo "running mkcheck"
+  echo "running check_survey"
   echo "$0: testing the build directory"
 elif [ "$WHICH"x = 1x ]; then
-  echo "running mkcheck"
+  echo "running check_survey"
   echo "$0: testing the install directory"
 else
-  echo 'Usage: mkcheck 0    /* test the build directory    */'
-  echo '       mkcheck 1    /* test the install directory  */'
+  echo 'Usage: check_survey 0    /* test the build directory    */'
+  echo '       check_survey 1    /* test the install directory  */'
   exit 1;
 fi
 
@@ -34,7 +34,7 @@ shift
 
 # This has been true all along.  Found out about it the hard way...
 case $BASH_VERSION in
-    1*)  echo 'You need bash 2.x to run mkcheck.  Exiting.'; exit 1 ;;
+    1*)  echo 'You need bash 2.x to run check_survey.  Exiting.'; exit 1 ;;
     *)   ;;   # ??
 esac
 
@@ -42,16 +42,15 @@ BUILD_DIR=@glibcpp_builddir@
 SRC_DIR=@glibcpp_srcdir@
 PREFIX_DIR=@glibcpp_prefixdir@
 if [ "$WHICH"x = 0x ]; then
-  CXX=`$BUILD_DIR/testsuite_flags --build-cxx`
-  INCLUDES=`$BUILD_DIR/testsuite_flags --build-includes`
+  CXX=`$BUILD_DIR/scripts/testsuite_flags --build-cxx`
+  INCLUDES=`$BUILD_DIR/scripts/testsuite_flags --build-includes`
 else
-  CXX=`$BUILD_DIR/testsuite_flags --install-cxx`
-  INCLUDES=`$BUILD_DIR/testsuite_flags --install-includes`
+  CXX=`$BUILD_DIR/scripts/testsuite_flags --install-cxx`
+  INCLUDES=`$BUILD_DIR/scripts/testsuite_flags --install-includes`
 fi
-CXXFLAGS=`$BUILD_DIR/testsuite_flags --cxxflags`
+CXXFLAGS=`$BUILD_DIR/scripts/testsuite_flags --cxxflags`
 LIBTOOL="$BUILD_DIR/libtool"
 LTEXE="$LIBTOOL --mode=execute"
-#LTCXX="$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $INCLUDES"
 LTCXX="$CXX $CXXFLAGS $INCLUDES"
 
 # specific libtool flag(s) to use shared libraries, if any
@@ -59,7 +58,6 @@ SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc -Wl,--rpath -Wl,$BUILD_DIR/src/.li
 
 # specific libtool flag(s) to use static libraries, if any
 ST_FLAG="-static"
-#ST_FLAG="-all-static"
 
 # Set up the testing directory, which should be in a directory called
 # "testsuite" in the root level of the build directory.
@@ -70,14 +68,10 @@ if [ ! -d ${TEST_DIR}/.libs ]; then
 fi
 
 # the name of the file that will collect and hold all this useful data:
-RESULTS_FILE="$TEST_DIR/$(date +%Y%m%d)-mkcheck.txt"
+RESULTS_FILE="$TEST_DIR/$(date +%Y%m%d)-check_survey.txt"
 
 # the name of the log file that will append compiler diagnostics:
-LOG_FILE="$TEST_DIR/$(date +%Y%m%d)-mkchecklog.txt"
-
-# the names of the specific test files to be run
-TESTS_FILE="$TEST_DIR/$(date +%Y%m%d)-mkcheckfiles.txt"
-
+LOG_FILE="$TEST_DIR/$(date +%Y%m%d)-check_survey_log.txt"
 
 #
 # 2: clean, make files, append general test info
@@ -97,6 +91,9 @@ if [ -f $LOG_FILE ]; then
     rm $LOG_FILE
 fi
 
+# the names of the specific test files to be run
+TESTS_FILE="$TEST_DIR/$(date +%Y%m%d)-check_survey_files.txt"
+
 # Make a list of the files we're going to run, or use an old one if it exists.
 if [ ! -f "$TESTS_FILE" ]; then
   if [ -f "$TEST_DIR/testsuite_files" ]; then
diff --git a/libstdc++-v3/config/abi/extract_symvers b/libstdc++-v3/scripts/extract_symvers
similarity index 100%
rename from libstdc++-v3/config/abi/extract_symvers
rename to libstdc++-v3/scripts/extract_symvers
diff --git a/libstdc++-v3/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in
similarity index 100%
rename from libstdc++-v3/testsuite_flags.in
rename to libstdc++-v3/scripts/testsuite_flags.in
diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am
index 7e5af5e37c9f..fe23b81ee4d1 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -37,14 +37,19 @@ AM_RUNTESTFLAGS =
 RUNTESTFLAGS =
 
 ## CXX is actually a "C" compiler. These are real C++ programs.
-## Do the same thing as `testsuite_flags --build-cxx`
-CXX_build = @glibcpp_CXX@ 
-CXX=`echo "$(CXX_build)" | sed 's,gcc/xgcc ,gcc/g++ ,'`
+glibcpp_srcdir=@glibcpp_srcdir@
+glibcpp_builddir=@glibcpp_builddir@
+testsuite_flags_script=${glibcpp_builddir}/scripts/testsuite_flags
+CXX=`${testsuite_flags_script} --build-cxx`
+
 CXXLINK = \
 	LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs\
 	$(LIBTOOL) --tag=CXX --mode=link $(CXX) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
 
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
 INCLUDES = \
 	-nostdinc++ \
 	@GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@ 
@@ -79,7 +84,7 @@ check-am:
 check-local: check-abi
 
 baseline_file = @baseline_file@
-extract_symvers = @glibcpp_srcdir@/config/abi/extract_symvers
+extract_symvers = @glibcpp_srcdir@/scripts/extract_symvers
 
 current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so
 	  -@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt)
@@ -116,6 +121,31 @@ check-abi-verbose:
 endif
 
 
+# These two special 'check-script' rules use the bash script 'check'
+# to do testing. This script is not as portable as the dejagnu test
+# harness, and is thus off by default. It does produce interesting
+# output however, including various performance analysis items like
+# compile time, execution time, and binary size.
+check_survey = ${glibcpp_builddir}/scripts/check_survey
+check-script: ${check_survey}
+	-@(chmod + ${check_survey}; \
+	  ${check_survey} 0)
+
+check-script-install: ${check_survey}
+	-@(chmod + ${check_survey}; \
+	  ${check_survey} 0)
+
+
+# Runs the testsuite/performance tests.  
+# Some of these tests create large (~75MB) files, allocate huge
+# ammounts of memory, or otherwise tie up machine resources. Thus,
+# running this is off by default.
+check_performance=${glibcpp_srcdir}/scripts/check_performance
+check-performance: ${check_performance}
+	-@(chmod + ${check_performance}; \
+	  ${check_performance} ${glibcpp_srcdir} ${glibcpp_builddir})
+
+
 # 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 
+	     testsuite_* site.exp abi_check baseline_symbols
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index bd1e20b541cf..3df92864cadf 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -93,11 +93,9 @@ EXEEXT = @EXEEXT@
 EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
 GCJ = @GCJ@
 GCJFLAGS = @GCJFLAGS@
-GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
 GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
 LIBMATHOBJS = @LIBMATHOBJS@
 LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
-LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
 LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
 LIBTOOL = @LIBTOOL@
 LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
@@ -115,7 +113,6 @@ SECTION_FLAGS = @SECTION_FLAGS@
 SECTION_LDFLAGS = @SECTION_LDFLAGS@
 STRIP = @STRIP@
 SYMVER_MAP = @SYMVER_MAP@
-TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
 USE_NLS = @USE_NLS@
 VERSION = @VERSION@
 WARN_FLAGS = @WARN_FLAGS@
@@ -128,10 +125,8 @@ glibcpp_MOFILES = @glibcpp_MOFILES@
 glibcpp_PCHFLAGS = @glibcpp_PCHFLAGS@
 glibcpp_POFILES = @glibcpp_POFILES@
 glibcpp_basedir = @glibcpp_basedir@
-glibcpp_builddir = @glibcpp_builddir@
 glibcpp_localedir = @glibcpp_localedir@
 glibcpp_prefixdir = @glibcpp_prefixdir@
-glibcpp_srcdir = @glibcpp_srcdir@
 glibcpp_thread_h = @glibcpp_thread_h@
 glibcpp_toolexecdir = @glibcpp_toolexecdir@
 glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
@@ -157,14 +152,20 @@ RUNTEST = `if [ -f @glibcpp_srcdir@/../dejagnu/runtest ] ; then \
 AM_RUNTESTFLAGS = 
 RUNTESTFLAGS = 
 
-CXX_build = @glibcpp_CXX@ 
-CXX = `echo "$(CXX_build)" | sed 's,gcc/xgcc ,gcc/g++ ,'`
+glibcpp_srcdir = @glibcpp_srcdir@
+glibcpp_builddir = @glibcpp_builddir@
+testsuite_flags_script = ${glibcpp_builddir}/scripts/testsuite_flags
+CXX = `${testsuite_flags_script} --build-cxx`
+
 CXXLINK = \
 	LD_RUN_PATH=$${LD_RUN_PATH:+$$LD_RUN_PATH:}${glibcpp_builddir}/src/.libs\
 	$(LIBTOOL) --tag=CXX --mode=link $(CXX) \
 	$(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
 
 
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
 INCLUDES = \
 	-nostdinc++ \
 	@GLIBCPP_INCLUDES@ @LIBSUPCXX_INCLUDES@ @TOPLEVEL_INCLUDES@ 
@@ -177,11 +178,24 @@ libv3test_a_SOURCES = testsuite_hooks.cc testsuite_allocator.cc
 abi_check_SOURCES = abi_check.cc
 
 baseline_file = @baseline_file@
-extract_symvers = @glibcpp_srcdir@/config/abi/extract_symvers
+extract_symvers = @glibcpp_srcdir@/scripts/extract_symvers
+
+# These two special 'check-script' rules use the bash script 'check'
+# to do testing. This script is not as portable as the dejagnu test
+# harness, and is thus off by default. It does produce interesting
+# output however, including various performance analysis items like
+# compile time, execution time, and binary size.
+check_survey = ${glibcpp_builddir}/scripts/check_survey
+
+# Runs the testsuite/performance tests.  
+# Some of these tests create large (~75MB) files, allocate huge
+# ammounts of memory, or otherwise tie up machine resources. Thus,
+# running this is off by default.
+check_performance = ${glibcpp_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 
+	     testsuite_* site.exp abi_check baseline_symbols
 
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 CONFIG_HEADER = ../config.h
@@ -510,6 +524,16 @@ new-abi-baseline:
 @GLIBCPP_TEST_ABI_TRUE@	-@(./abi_check --check-verbose ./current_symbols.txt ${baseline_file})
 @GLIBCPP_TEST_ABI_FALSE@check-abi:
 @GLIBCPP_TEST_ABI_FALSE@check-abi-verbose:
+check-script: ${check_survey}
+	-@(chmod + ${check_survey}; \
+	  ${check_survey} 0)
+
+check-script-install: ${check_survey}
+	-@(chmod + ${check_survey}; \
+	  ${check_survey} 0)
+check-performance: ${check_performance}
+	-@(chmod + ${check_performance}; \
+	  ${check_performance} ${glibcpp_srcdir} ${glibcpp_builddir})
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp b/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp
index 6a4351c21e5f..e9722ac660eb 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp
@@ -110,7 +110,7 @@ proc libstdc++-v3-init { args } {
       set includes "-I./"
     } else {
         # If we find a testsuite_flags file, we're testing in the build dir.
-        set flags_file "${blddir}/testsuite_flags"
+        set flags_file "${blddir}/scripts/testsuite_flags"
         if { [file exists $flags_file] } {
             set cxx [exec sh $flags_file --build-cxx]
             set cxxflags [exec sh $flags_file --cxxflags]
-- 
GitLab