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
|
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)
|
2001-09-06 00:38:06 +02:00
|
|
|
INCLUDES="-I${SRC_DIR}/testsuite"
|
2001-05-12 19:45:46 +02:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--build-includes)
|
2003-07-22 00:12:53 +02:00
|
|
|
INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@ -I${SRC_DIR}/libsupc++
|
|
|
|
-I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite"
|
2001-05-12 19:45:46 +02:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--install-cxx)
|
|
|
|
CXX=${PREFIX_DIR}/bin/g++
|
|
|
|
echo ${CXX}
|
|
|
|
;;
|
|
|
|
--build-cxx)
|
2003-07-05 06:05:45 +02:00
|
|
|
PCHFLAGS="@glibcxx_PCHFLAGS@"
|
2003-08-05 04:00:18 +02:00
|
|
|
CXX_build="@CXX@ ${PCHFLAGS}"
|
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)
|
2003-03-14 23:16:06 +01:00
|
|
|
CXXFLAGS_save="-g -O2"
|
|
|
|
CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0
|
2003-07-05 06:05:45 +02:00
|
|
|
@EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcxx_localedir@" '
|
2003-03-14 23:16:06 +01:00
|
|
|
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
|
2001-05-12 19:45:46 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
print_usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|