| OLD | NEW |
| (Empty) |
| 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 | |
| 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 | |
| 24 } | |
| 25 | |
| 26 # Establish configure-generated directory structure. | |
| 27 BUILD_DIR=@glibcxx_builddir@ | |
| 28 SRC_DIR=@glibcxx_srcdir@ | |
| 29 PREFIX_DIR=@glibcxx_prefixdir@ | |
| 30 query=$1 | |
| 31 | |
| 32 case ${query} in | |
| 33 --install-includes) | |
| 34 INCLUDES="-I${SRC_DIR}/testsuite/util" | |
| 35 echo ${INCLUDES} | |
| 36 ;; | |
| 37 --build-includes) | |
| 38 INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@ | |
| 39 -I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util" | |
| 40 echo ${INCLUDES} | |
| 41 ;; | |
| 42 --install-cxx) | |
| 43 CXX=${PREFIX_DIR}/bin/g++ | |
| 44 echo ${CXX} | |
| 45 ;; | |
| 46 --build-cxx) | |
| 47 CXX_build="@CXX@" | |
| 48 CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'` | |
| 49 echo ${CXX} | |
| 50 ;; | |
| 51 --build-cc) | |
| 52 CC_build="@CC@" | |
| 53 CC="$CC_build" | |
| 54 echo ${CC} | |
| 55 ;; | |
| 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} | |
| 60 ;; | |
| 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} | |
| 67 ;; | |
| 68 --cxxpchflags) | |
| 69 PCHFLAGS="@glibcxx_PCHFLAGS@" | |
| 70 echo ${PCHFLAGS} | |
| 71 ;; | |
| 72 --cxxldflags) | |
| 73 SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@" | |
| 74 echo ${SECTIONLDFLAGS} | |
| 75 ;; | |
| 76 *) | |
| 77 print_usage | |
| 78 ;; | |
| 79 esac | |
| 80 | |
| 81 exit 0 | |
| OLD | NEW |