Mercurial > hg > CbC > CbC_gcc
view libstdc++-v3/scripts/check_compile @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
#!/usr/bin/env bash # Script to do compilation-only testing. # Invocation # check_compile SRC_DIR BUILD_DIR # 1: variables # SRC_DIR=$1 BUILD_DIR=$2 # Now that we've successfully translated the numerical option into # a symbolic one, we can safely ignore it. shift # This has been true all along. Found out about it the hard way... case $BASH_VERSION in 1*) echo 'You need bash 2.x to run check_compile. Exiting.'; exit 1 ;; *) ;; esac flags_script=$BUILD_DIR/scripts/testsuite_flags INCLUDES=`$flags_script --build-includes` PCH_FLAGS=`$flags_script --cxxpchflags` FLAGS=`$flags_script --cxxflags` TEST_FLAGS="-S" COMPILER=`$flags_script --build-cxx` CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS -Wfatal-errors $TEST_FLAGS" echo "compile line is:" echo $CXX echo "" TESTS_FILE="testsuite_files" #mkdir binaries UNIQUE_ID=0 for NAME in `cat $TESTS_FILE` do if $RUN; then echo $NAME OUTPUT_NAME=$UNIQUE_ID $CXX $SRC_DIR/testsuite/$NAME -o $OUTPUT_NAME if [ -f $OUTPUT_NAME ]; then # mv $OUTPUT_NAME binaries rm $OUTPUT_NAME fi let UNIQUE_ID+=1 fi done exit 0