# HG changeset patch # User Olaf Wintermann # Date 1565727336 -7200 # Node ID cdf8bf4549c44241250dba7a19e77e234de8256e # Parent a775e493d340fc32fb50f4ab3da87fe47291d1ba fix compiler flag generation diff -r a775e493d340 -r cdf8bf4549c4 test/configure --- a/test/configure Tue Aug 13 21:54:17 2019 +0200 +++ b/test/configure Tue Aug 13 22:15:36 2019 +0200 @@ -232,7 +232,7 @@ # Toolchain detection # this will insert make vars to config.mk -source make/toolchain.sh +. make/toolchain.sh # add user specified flags to config.mk echo >> $TEMP_DIR/config.mk diff -r a775e493d340 -r cdf8bf4549c4 test/make/configure.vm --- a/test/make/configure.vm Tue Aug 13 21:54:17 2019 +0200 +++ b/test/make/configure.vm Tue Aug 13 22:15:36 2019 +0200 @@ -317,7 +317,7 @@ # Toolchain detection # this will insert make vars to config.mk -source make/toolchain.sh +. make/toolchain.sh # add user specified flags to config.mk echo >> $TEMP_DIR/config.mk @@ -370,12 +370,12 @@ #if( $flags.exec ) $flags.value > /dev/null if [ $? -eq 0 ]; then - $flags.varName="$flags.varName `$flags.value`" + $flags.varName="$$flags.varName `$flags.value`" else break fi #else - $flags.varName="$flags.varName $flags.value" + $flags.varName="$$flags.varName $flags.value" #end #end #foreach( $test in $sub.tests ) @@ -444,13 +444,13 @@ #if( $flags.exec ) $flags.value > /dev/null if [ $? -ne 0 ]; then - $flags.varName="$flags.varName `$flags.value`" + $flags.varName="$$flags.varName `$flags.value`" else ERROR=1 break fi #else - $flags.varName="$flags.varName $flags.value" + $flags.varName="$$flags.varName $flags.value" #end #end #if ( $dependency.make.length() > 0 ) diff -r a775e493d340 -r cdf8bf4549c4 test/make/toolchain.sh --- a/test/make/toolchain.sh Tue Aug 13 21:54:17 2019 +0200 +++ b/test/make/toolchain.sh Tue Aug 13 22:15:36 2019 +0200 @@ -99,7 +99,7 @@ TOOLCHAIN_NAME=`$TEMP_DIR/checkcc` TOOLCHAIN_CC=$COMP - echo $TOOLCHAIN_NAME + echo $COMP break fi done @@ -113,7 +113,7 @@ do check_cpp_compiler $COMP if [ $? -ne 0 ]; then - if [[ ! -z $CXX ]]; then + if [ ! -z "$CXX" ]; then if [ $COMP = $CXX ]; then echo "$CC is not a working C++ Compiler" TOOLCHAIN_DETECTION_ERROR="error" @@ -127,22 +127,22 @@ # these commands and not 'cc' TOOLCHAIN_NAME=`$TEMP_DIR/checkcc` if [ $TOOLCHAIN_NAME = "gcc" ]; then - check_c_compiler "gcc" + check_cpp_compiler "g++" if [ $? -eq 0 ]; then - COMP=gcc + COMP=g++ fi fi if [ $TOOLCHAIN_NAME = "clang" ]; then - check_c_compiler "clang" + check_cpp_compiler "clang++" if [ $? -eq 0 ]; then - COMP=clang + COMP=clang++ fi fi fi TOOLCHAIN_NAME=`$TEMP_DIR/checkcc` TOOLCHAIN_CXX=$COMP - echo $TOOLCHAIN_NAME + echo $COMP break fi done