re PR c++/52312 (grokfndecl: valgrind problem)
[official-gcc.git] / libstdc++-v3 / scripts / testsuite_flags.in
blob457adaf4d5f0231120dc8a55cb46c3dfcc8bc371
1 #!/bin/sh
4 # This script computes the various flags needed to run GNU C++ testsuites
5 # (compiler specific as well as library specific).
7 # Written by Benjamin Kosnik <bkoz@redhat.com>
8 # Gabriel Dos Reis <gdr@codesourcery.com>
11 # Print a message saying how this script is intended to be invoked
12 print_usage() {
13 cat <<EOF
14 Usage:
15 testsuite_flags --install-includes
16 --build-includes
17 --build-cxx
18 --build-cc
19 --install-cxx
20 --cxxflags
21 --cxxpchflags
22 --cxxldflags
23 EOF
26 # Establish configure-generated directory structure.
27 BUILD_DIR=@glibcxx_builddir@
28 SRC_DIR=@glibcxx_srcdir@
29 PREFIX_DIR=@glibcxx_prefixdir@
30 query=$1
32 case ${query} in
33 --install-includes)
34 INCLUDES="-I${SRC_DIR}/testsuite/util"
35 echo ${INCLUDES}
37 --build-includes)
38 INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@
39 -I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util"
40 echo ${INCLUDES}
42 --install-cxx)
43 CXX=${PREFIX_DIR}/bin/g++
44 echo ${CXX}
46 --build-cxx)
47 CXX_build="@CXX@"
48 CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
49 echo ${CXX}
51 --build-cc)
52 CC_build="@CC@"
53 CC="$CC_build"
54 echo ${CC}
56 --cxxflags)
57 CXXFLAGS_default="-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
58 CXXFLAGS_config="@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@"
59 echo ${CXXFLAGS_default} ${CXXFLAGS_config}
61 --cxxparallelflags)
62 CXXFLAGS_parallel="-D_GLIBCXX_PARALLEL -fopenmp
63 -B${BUILD_DIR}/../libgomp
64 -I${BUILD_DIR}/../libgomp
65 -L${BUILD_DIR}/../libgomp/.libs -lgomp"
66 echo ${CXXFLAGS_parallel}
68 --cxxpchflags)
69 PCHFLAGS="@glibcxx_PCHFLAGS@"
70 echo ${PCHFLAGS}
72 --cxxldflags)
73 SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@"
74 echo ${SECTIONLDFLAGS}
77 print_usage
79 esac
81 exit 0