testsuite_flags.in revision 169691
1#!/bin/sh 2 3# 4# This script computes the various flags needed to run GNU C++ testsuites 5# (compiler specific as well as library specific). 6# 7# Written by Benjamin Kosnik <bkoz@redhat.com> 8# Gabriel Dos Reis <gdr@codesourcery.com> 9# 10 11# Print a message saying how this script is intended to be invoked 12print_usage() { 13 cat <<EOF 14Usage: 15 testsuite_flags --install-includes 16 --build-includes 17 --build-cxx 18 --install-cxx 19 --cxxflags 20 --cxxpchflags 21 --cxxldflags 22EOF 23} 24 25# Establish configure-generated directory structure. 26BUILD_DIR=@glibcxx_builddir@ 27SRC_DIR=@glibcxx_srcdir@ 28PREFIX_DIR=@glibcxx_prefixdir@ 29query=$1 30 31case ${query} in 32 --install-includes) 33 INCLUDES="-I${SRC_DIR}/testsuite/util" 34 echo ${INCLUDES} 35 ;; 36 --build-includes) 37 INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@ 38 -I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util" 39 echo ${INCLUDES} 40 ;; 41 --install-cxx) 42 CXX=${PREFIX_DIR}/bin/g++ 43 echo ${CXX} 44 ;; 45 --build-cxx) 46 CXX_build="@CXX@" 47 CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'` 48 echo ${CXX} 49 ;; 50 --cxxflags) 51 CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT" 52 CXXFLAGS_config='@SECTION_FLAGS@ -fmessage-length=0 53 @CXXFLAGS@ @EXTRA_CXX_FLAGS@ ' 54 echo ${CXXFLAGS_save} ${CXXFLAGS_config} 55 ;; 56 --cxxpchflags) 57 PCHFLAGS="@glibcxx_PCHFLAGS@" 58 echo ${PCHFLAGS} 59 ;; 60 --cxxldflags) 61 SECTIONLDFLAGS="@SECTION_LDFLAGS@" 62 echo ${SECTIONLDFLAGS} 63 ;; 64 *) 65 print_usage 66 ;; 67esac 68 69exit 0 70