]> www.infradead.org Git - qemu-nvme.git/commitdiff
configure: don't enable cross compilers unless in target_list
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 27 Oct 2022 18:36:10 +0000 (19:36 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 31 Oct 2022 20:37:58 +0000 (20:37 +0000)
This avoids the unfortunate effect of always builds the pc-bios blobs
for targets the user isn't interested in.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20221027183637.2772968-5-alex.bennee@linaro.org>

configure

index 81561be7c11b696950eafb9f90ce8bb477a205e4..dd6f58dcde12c9220aef0d43ff4148a288d3e7e5 100755 (executable)
--- a/configure
+++ b/configure
@@ -1877,6 +1877,15 @@ probe_target_compiler() {
   container_cross_ranlib=
   container_cross_strip=
 
+  # We shall skip configuring the target compiler if the user didn't
+  # bother enabling an appropriate guest. This avoids building
+  # extraneous firmware images and tests.
+  if test "${target_list#*$1}" != "$1"; then
+      break;
+  else
+      return 1
+  fi
+
   target_arch=${1%%-*}
   case $target_arch in
     aarch64) container_hosts="x86_64 aarch64" ;;