summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/testsuite_flags.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libstdc++/testsuite_flags.in')
-rwxr-xr-xcontrib/libstdc++/testsuite_flags.in61
1 files changed, 61 insertions, 0 deletions
diff --git a/contrib/libstdc++/testsuite_flags.in b/contrib/libstdc++/testsuite_flags.in
new file mode 100755
index 0000000..1a24b5e
--- /dev/null
+++ b/contrib/libstdc++/testsuite_flags.in
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+#
+# This script computes the various flags needed to run GNU C++ testsuites
+# (compiler specific as well as library specific).
+#
+# Written by Benjamin Kosnik <bkoz@redhat.com>
+# Gabriel Dos Reis <gdr@codesourcery.com>
+#
+
+# Print a message saying how this script is intended to be invoked
+print_usage() {
+ cat <<EOF
+Usage:
+ testsuite_flags --install-includes
+ --build-includes
+ --build-cxx
+ --install-cxx
+ --cxxflags
+EOF
+}
+
+# Establish configure-generated directory structure.
+BUILD_DIR=@glibcpp_builddir@
+SRC_DIR=@glibcpp_srcdir@
+PREFIX_DIR=@glibcpp_prefixdir@
+query=$1
+
+case ${query} in
+ --install-includes)
+ INCLUDES="-I${SRC_DIR}/testsuite"
+ echo ${INCLUDES}
+ ;;
+ --build-includes)
+ INCLUDES="-nostdinc++ @GLIBCPP_INCLUDES@
+ -I${SRC_DIR}/libsupc++ -I${SRC_DIR}/libio
+ -I${SRC_DIR}/include/backward
+ -I${SRC_DIR}/testsuite"
+ echo ${INCLUDES}
+ ;;
+ --install-cxx)
+ CXX=${PREFIX_DIR}/bin/g++
+ echo ${CXX}
+ ;;
+ --build-cxx)
+ CC_build="@glibcpp_CXX@"
+ CXX=`echo $CC_build | sed 's/xgcc/g++/g'`
+ echo ${CXX}
+ ;;
+ --cxxflags)
+ CXXFLAGS=' -g @SECTION_FLAGS@ @SECTION_LDFLAGS@
+ -fmessage-length=0
+ -DDEBUG_ASSERT -DLOCALEDIR="@glibcpp_localedir@" '
+ echo ${CXXFLAGS}
+ ;;
+ *)
+ print_usage
+ ;;
+esac
+
+exit 0
OpenPOWER on IntegriCloud