qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] configure: Fail when specified cross compiler cannot be found
@ 2020-12-16  1:36 Gustavo Romero
  2020-12-16 10:51 ` Alex Bennée
  0 siblings, 1 reply; 7+ messages in thread
From: Gustavo Romero @ 2020-12-16  1:36 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc; +Cc: gustavo.romero, gromero, alex.bennee, david

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 <gromero@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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-19 12:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16  1:36 [PATCH] configure: Fail when specified cross compiler cannot be found Gustavo Romero
2020-12-16 10:51 ` Alex Bennée
2020-12-17 16:55   ` Gustavo Romero
2020-12-17 17:56     ` Alex Bennée
2020-12-18 10:05       ` Paolo Bonzini
2020-12-18 11:57         ` Alex Bennée
2020-12-19 12:11           ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).