[PATCH] Adjust lazy macro definition
[official-gcc.git] / libstdc++-v3 / scripts / testsuite_flags.in
blobcf7f0f7411e5e3ae421ed7e2353080f143d9150e
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 --cxxldflags
22 --cxxpchflags
23 --cxxvtvflags
25 EOF
28 # Establish configure-generated directory structure.
29 BUILD_DIR=@glibcxx_builddir@
30 SRC_DIR=@glibcxx_srcdir@
31 PREFIX_DIR=@glibcxx_prefixdir@
32 query=$1
34 case ${query} in
35 --install-includes)
36 INCLUDES="-I${SRC_DIR}/testsuite/util"
37 echo ${INCLUDES}
39 --build-includes)
40 INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@
41 -I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util"
42 echo ${INCLUDES}
44 --install-cxx)
45 CXX=${PREFIX_DIR}/bin/g++
46 echo ${CXX}
48 --build-cxx)
49 CXX_build="@CXX@"
50 CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/xg++ ,'`
51 echo ${CXX}
53 --build-cc)
54 CC_build="@CC@"
55 CC="$CC_build"
56 echo ${CC}
58 --cxxflags)
59 CXXFLAGS_default="-fmessage-length=0 -fno-show-column"
60 CXXFLAGS_config="@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@"
61 echo ${CXXFLAGS_default} ${CXXFLAGS_config}
63 --cxxvtvflags)
64 CXXFLAGS_vtv="@VTV_CXXFLAGS@"
65 LDFLAGS_vtv="@VTV_CXXLINKFLAGS@"
66 echo ${CXXFLAGS_vtv} ${LDFLAGS_vtv}
68 --cxxparallelflags)
69 CXXFLAGS_parallel="-D_GLIBCXX_PARALLEL -fopenmp
70 -B${BUILD_DIR}/../libgomp
71 -I${BUILD_DIR}/../libgomp
72 -L${BUILD_DIR}/../libgomp/.libs -lgomp"
73 echo ${CXXFLAGS_parallel}
75 --cxxpchflags)
76 PCHFLAGS="@glibcxx_PCHFLAGS@"
77 echo ${PCHFLAGS}
79 --cxxldflags)
80 SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@
81 -L${BUILD_DIR}/src/filesystem/.libs"
82 echo ${SECTIONLDFLAGS}
85 print_usage
87 esac
89 exit 0