summaryrefslogtreecommitdiff
path: root/libstdc++-v3/scripts/testsuite_flags.in
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /libstdc++-v3/scripts/testsuite_flags.in
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'libstdc++-v3/scripts/testsuite_flags.in')
-rwxr-xr-xlibstdc++-v3/scripts/testsuite_flags.in81
1 files changed, 81 insertions, 0 deletions
diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in
new file mode 100755
index 000000000..457adaf4d
--- /dev/null
+++ b/libstdc++-v3/scripts/testsuite_flags.in
@@ -0,0 +1,81 @@
+#!/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
+ --build-cc
+ --install-cxx
+ --cxxflags
+ --cxxpchflags
+ --cxxldflags
+EOF
+}
+
+# Establish configure-generated directory structure.
+BUILD_DIR=@glibcxx_builddir@
+SRC_DIR=@glibcxx_srcdir@
+PREFIX_DIR=@glibcxx_prefixdir@
+query=$1
+
+case ${query} in
+ --install-includes)
+ INCLUDES="-I${SRC_DIR}/testsuite/util"
+ echo ${INCLUDES}
+ ;;
+ --build-includes)
+ INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@
+ -I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util"
+ echo ${INCLUDES}
+ ;;
+ --install-cxx)
+ CXX=${PREFIX_DIR}/bin/g++
+ echo ${CXX}
+ ;;
+ --build-cxx)
+ CXX_build="@CXX@"
+ CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
+ echo ${CXX}
+ ;;
+ --build-cc)
+ CC_build="@CC@"
+ CC="$CC_build"
+ echo ${CC}
+ ;;
+ --cxxflags)
+ CXXFLAGS_default="-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
+ CXXFLAGS_config="@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@"
+ echo ${CXXFLAGS_default} ${CXXFLAGS_config}
+ ;;
+ --cxxparallelflags)
+ CXXFLAGS_parallel="-D_GLIBCXX_PARALLEL -fopenmp
+ -B${BUILD_DIR}/../libgomp
+ -I${BUILD_DIR}/../libgomp
+ -L${BUILD_DIR}/../libgomp/.libs -lgomp"
+ echo ${CXXFLAGS_parallel}
+ ;;
+ --cxxpchflags)
+ PCHFLAGS="@glibcxx_PCHFLAGS@"
+ echo ${PCHFLAGS}
+ ;;
+ --cxxldflags)
+ SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@"
+ echo ${SECTIONLDFLAGS}
+ ;;
+ *)
+ print_usage
+ ;;
+esac
+
+exit 0