2001-05-12 19:45:46 +02: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:
|
2001-05-14 03:15:36 +02:00
|
|
|
testsuite_flags --install-includes
|
|
|
|
--build-includes
|
|
|
|
--build-cxx
|
|
|
|
--install-cxx
|
|
|
|
--cxxflags
|
2003-12-22 21:09:23 +01:00
|
|
|
--cxxpchflags
|
2006-01-13 04:58:38 +01:00
|
|
|
--cxxldflags
|
2001-05-12 19:45:46 +02:00
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
# Establish configure-generated directory structure.
|
2003-07-05 06:05:45 +02:00
|
|
|
BUILD_DIR=@glibcxx_builddir@
|
|
|
|
SRC_DIR=@glibcxx_srcdir@
|
|
|
|
PREFIX_DIR=@glibcxx_prefixdir@
|
2001-05-12 19:45:46 +02:00
|
|
|
query=$1
|
|
|
|
|
|
|
|
case ${query} in
|
|
|
|
--install-includes)
|
2006-06-15 01:09:51 +02:00
|
|
|
INCLUDES="-I${SRC_DIR}/testsuite/util"
|
2001-05-12 19:45:46 +02:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--build-includes)
|
2004-10-25 22:32:40 +02:00
|
|
|
INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@
|
2006-06-07 16:58:24 +02:00
|
|
|
-I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util"
|
2001-05-12 19:45:46 +02:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--install-cxx)
|
|
|
|
CXX=${PREFIX_DIR}/bin/g++
|
|
|
|
echo ${CXX}
|
|
|
|
;;
|
|
|
|
--build-cxx)
|
2003-12-22 21:09:23 +01:00
|
|
|
CXX_build="@CXX@"
|
2003-04-26 06:01:47 +02:00
|
|
|
CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
|
2001-05-12 19:45:46 +02:00
|
|
|
echo ${CXX}
|
|
|
|
;;
|
|
|
|
--cxxflags)
|
2004-03-05 00:29:44 +01:00
|
|
|
CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT"
|
2006-01-13 04:58:38 +01:00
|
|
|
CXXFLAGS_config='@SECTION_FLAGS@ -fmessage-length=0
|
2006-07-15 00:41:43 +02:00
|
|
|
@CXXFLAGS@ @EXTRA_CXX_FLAGS@ '
|
2003-03-14 23:16:06 +01:00
|
|
|
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
|
2001-05-12 19:45:46 +02:00
|
|
|
;;
|
2003-12-22 21:09:23 +01:00
|
|
|
--cxxpchflags)
|
|
|
|
PCHFLAGS="@glibcxx_PCHFLAGS@"
|
|
|
|
echo ${PCHFLAGS}
|
|
|
|
;;
|
2006-01-13 04:58:38 +01:00
|
|
|
--cxxldflags)
|
|
|
|
SECTIONLDFLAGS="@SECTION_LDFLAGS@"
|
|
|
|
echo ${SECTIONLDFLAGS}
|
|
|
|
;;
|
2001-05-12 19:45:46 +02:00
|
|
|
*)
|
2005-11-09 00:07:02 +01:00
|
|
|
print_usage
|
2001-05-12 19:45:46 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|