Currently if the cross compiler passed to 'configure' (--cross-cc-<arch>) does not exist no error happens and only later when the TCG tests are run they fail because the cross compiler is not set correctly.
This commit changes that behavior and make 'configure' fail if the specified cross compiler cannot be found, displaying an error similar to the following: $ ../configure --target-list=ppc64-softmmu --cross-cc-ppc64=nonexisting_gcc Specified cross-compiler 'nonexisting_gcc' not found! Signed-off-by: Gustavo Romero <grom...@linux.ibm.com> --- configure | 2 +- tests/tcg/configure.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index cb21108d34..c0389f5839 100755 --- a/configure +++ b/configure @@ -6854,7 +6854,7 @@ done export $i done export target_list source_path use_containers -$source_path/tests/tcg/configure.sh) +$source_path/tests/tcg/configure.sh) || exit 1 # temporary config to build submodules for rom in seabios; do diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index e1b70e25f2..6c89d75c38 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -212,8 +212,10 @@ for target in $target_list; do eval "target_compiler=\${cross_cc_$i}" if ! has $target_compiler; then - continue + echo "Specified cross-compiler '$target_compiler' not found!" + exit 1 fi + write_c_skeleton if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then # For host systems we might get away with building without -static -- 2.17.1