2001-05-13 01:45:46 +08: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 09:15:36 +08:00
|
|
|
testsuite_flags --install-includes
|
|
|
|
--build-includes
|
|
|
|
--build-cxx
|
|
|
|
--install-cxx
|
|
|
|
--cxxflags
|
2001-05-13 01:45:46 +08:00
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
# Establish configure-generated directory structure.
|
|
|
|
BUILD_DIR=@glibcpp_builddir@
|
|
|
|
SRC_DIR=@glibcpp_srcdir@
|
|
|
|
PREFIX_DIR=@glibcpp_prefixdir@
|
|
|
|
query=$1
|
|
|
|
|
|
|
|
case ${query} in
|
|
|
|
--install-includes)
|
2001-09-06 06:38:06 +08:00
|
|
|
INCLUDES="-I${SRC_DIR}/testsuite"
|
2001-05-13 01:45:46 +08:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--build-includes)
|
2001-07-14 00:47:56 +08:00
|
|
|
INCLUDES="-nostdinc++ @GLIBCPP_INCLUDES@
|
2001-05-13 01:45:46 +08:00
|
|
|
-I${SRC_DIR}/libsupc++ -I${SRC_DIR}/libio
|
2001-08-24 06:35:52 +08:00
|
|
|
-I${SRC_DIR}/include/backward
|
2001-09-06 06:38:06 +08:00
|
|
|
-I${SRC_DIR}/testsuite"
|
2001-05-13 01:45:46 +08:00
|
|
|
echo ${INCLUDES}
|
|
|
|
;;
|
|
|
|
--install-cxx)
|
|
|
|
CXX=${PREFIX_DIR}/bin/g++
|
|
|
|
echo ${CXX}
|
|
|
|
;;
|
|
|
|
--build-cxx)
|
2003-04-18 10:03:52 +08:00
|
|
|
PCHFLAGS="-include bits/stdc++.h"
|
2003-04-26 12:01:47 +08:00
|
|
|
CXX_build="@glibcpp_CXX@ ${PCHFLAGS}"
|
|
|
|
CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
|
2001-05-13 01:45:46 +08:00
|
|
|
echo ${CXX}
|
|
|
|
;;
|
|
|
|
--cxxflags)
|
2003-03-15 06:16:06 +08:00
|
|
|
CXXFLAGS_save="-g -O2"
|
|
|
|
CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0
|
|
|
|
@EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcpp_localedir@" '
|
|
|
|
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
|
2001-05-13 01:45:46 +08:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
print_usage
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|