2004-07-28 04:12:05 +01: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
|
|
|
|
--install-cxx
|
|
|
|
--cxxflags
|
|
|
|
--cxxpchflags
|
2007-05-19 02:25:07 +01:00
|
|
|
--cxxldflags
|
2004-07-28 04:12:05 +01: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)
|
2007-05-19 02:25:07 +01:00
|
|
|
INCLUDES="-I${SRC_DIR}/testsuite/util"
|
2004-07-28 04:12:05 +01:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--build-includes)
|
2007-05-19 02:25:07 +01:00
|
|
|
INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@
|
|
|
|
-I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util"
|
2004-07-28 04:12:05 +01:00
|
|
|
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}
|
|
|
|
;;
|
|
|
|
--cxxflags)
|
|
|
|
CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
|
2007-05-19 02:25:07 +01:00
|
|
|
CXXFLAGS_config='@SECTION_FLAGS@ -fmessage-length=0
|
|
|
|
@CXXFLAGS@ @EXTRA_CXX_FLAGS@ '
|
2004-07-28 04:12:05 +01:00
|
|
|
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
|
|
|
|
;;
|
|
|
|
--cxxpchflags)
|
|
|
|
PCHFLAGS="@glibcxx_PCHFLAGS@"
|
|
|
|
echo ${PCHFLAGS}
|
|
|
|
;;
|
2007-05-19 02:25:07 +01:00
|
|
|
--cxxldflags)
|
|
|
|
SECTIONLDFLAGS="@SECTION_LDFLAGS@"
|
|
|
|
echo ${SECTIONLDFLAGS}
|
|
|
|
;;
|
2004-07-28 04:12:05 +01:00
|
|
|
*)
|
2007-05-19 02:25:07 +01:00
|
|
|
print_usage
|
2004-07-28 04:12:05 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|