Retro68/gcc/libstdc++-v3/scripts/testsuite_flags.in

90 lines
2.1 KiB
Plaintext
Raw Normal View History

2012-03-27 23:13:14 +00:00
#!/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
--cxxldflags
2014-09-21 17:33:12 +00:00
--cxxpchflags
--cxxvtvflags
2012-03-27 23:13:14 +00:00
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@"
2014-09-21 17:33:12 +00:00
CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/xg++ ,'`
2012-03-27 23:13:14 +00:00
echo ${CXX}
;;
--build-cc)
CC_build="@CC@"
CC="$CC_build"
echo ${CC}
;;
--cxxflags)
CXXFLAGS_default="-fmessage-length=0 -fno-show-column"
2015-08-28 15:33:40 +00:00
CXXFLAGS_config="@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@"
2014-09-21 17:33:12 +00:00
echo ${CXXFLAGS_default} ${CXXFLAGS_config}
;;
--cxxvtvflags)
CXXFLAGS_vtv="@VTV_CXXFLAGS@"
LDFLAGS_vtv="@VTV_CXXLINKFLAGS@"
echo ${CXXFLAGS_vtv} ${LDFLAGS_vtv}
2012-03-27 23:13:14 +00:00
;;
--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)
2017-04-10 11:32:00 +00:00
SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@
-L${BUILD_DIR}/src/filesystem/.libs"
2012-03-27 23:13:14 +00:00
echo ${SECTIONLDFLAGS}
;;
*)
print_usage
;;
esac
exit 0