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
|
2007-04-23 09:38:33 +02:00
|
|
|
--build-cc
|
2001-05-14 03:15:36 +02:00
|
|
|
--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}
|
|
|
|
;;
|
2007-04-23 09:38:33 +02:00
|
|
|
--build-cc)
|
|
|
|
CC_build="@CC@"
|
|
|
|
CC="$CC_build"
|
|
|
|
echo ${CC}
|
|
|
|
;;
|
2001-05-12 19:45:46 +02:00
|
|
|
--cxxflags)
|
2007-09-07 05:01:53 +02:00
|
|
|
CXXFLAGS_default="-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
|
|
|
|
CXXFLAGS_config="@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@"
|
|
|
|
echo ${CXXFLAGS_default} ${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)
|
2007-02-09 13:47:41 +01:00
|
|
|
SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@"
|
2006-01-13 04:58:38 +01:00
|
|
|
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
|