aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/scripts/testsuite_flags.in
blob: 8e8f93970ee7a1850b48c68a611c65190bf0b75e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/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: 
    testsuite_flags --install-includes
		    --build-includes
		    --build-cxx
		    --install-cxx
		    --cxxflags
EOF
}

# Establish configure-generated directory structure.
BUILD_DIR=@glibcxx_builddir@
SRC_DIR=@glibcxx_srcdir@
PREFIX_DIR=@glibcxx_prefixdir@
query=$1

case ${query} in
    --install-includes)
      INCLUDES="-I${SRC_DIR}/testsuite"
      echo ${INCLUDES}
      ;;
    --build-includes)
      INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@
	        -I${SRC_DIR}/libsupc++ -I${SRC_DIR}/libio 
		-I${SRC_DIR}/include/backward 
		-I${SRC_DIR}/testsuite"
      echo ${INCLUDES}
      ;;
    --install-cxx)
      CXX=${PREFIX_DIR}/bin/g++
      echo ${CXX}
      ;;
    --build-cxx)
      PCHFLAGS="@glibcxx_PCHFLAGS@"
      CXX_build="@glibcxx_CXX@ ${PCHFLAGS}"
      CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
      echo ${CXX}
      ;;
    --cxxflags)
      CXXFLAGS_save="-g -O2"
      CXXFLAGS_config='@SECTION_FLAGS@ @SECTION_LDFLAGS@ -fmessage-length=0 
 		      @EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcxx_localedir@" '
      echo ${CXXFLAGS_save} ${CXXFLAGS_config}
      ;;
    *)
      print_usage
      ;;
esac

exit 0