diff mbox series

[v2,4/7] configure: don't enable cross compilers unless in target_list

Message ID 20221013154705.1846261-5-alex.bennee@linaro.org
State New
Headers show
Series testing/next (configure, RUNC, win32|64) | expand

Commit Message

Alex Bennée Oct. 13, 2022, 3:47 p.m. UTC
This avoids the unfortunate effect of always builds the pc-bios blobs
for targets the user isn't interested in.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 configure | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Alex Bennée Oct. 13, 2022, 7:48 p.m. UTC | #1
Alex Bennée <alex.bennee@linaro.org> writes:

> This avoids the unfortunate effect of always builds the pc-bios blobs
> for targets the user isn't interested in.
>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configure | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/configure b/configure
> index 45ee6f4eb3..246651f25d 100755
> --- a/configure
> +++ b/configure
> @@ -1866,6 +1866,11 @@ probe_target_compiler() {
>    container_cross_ranlib=
>    container_cross_strip=
>  
> +  case " $target_list " in
> +    " $1 ") ;;
> +    *) return 1 ;;
> +  esac
> +

this of course prevents building of roms by actually disabling all
target compilers...

>    target_arch=${1%%-*}
>    case $target_arch in
>      aarch64) container_hosts="x86_64 aarch64" ;;
Paolo Bonzini Oct. 13, 2022, 8:26 p.m. UTC | #2
On 10/13/22 21:48, Alex Bennée wrote:
>> +  case " $target_list " in
>> +    " $1 ") ;;
>> +    *) return 1 ;;
>> +  esac
>> +
> this of course prevents building of roms by actually disabling all
> target compilers...

Yeah, two asterisks are missing.  I'll send out a proper patch.

Paolo
Alex Bennée Oct. 14, 2022, 8:13 a.m. UTC | #3
Paolo Bonzini <pbonzini@redhat.com> writes:

> On 10/13/22 21:48, Alex Bennée wrote:
>>> +  case " $target_list " in
>>> +    " $1 ") ;;
>>> +    *) return 1 ;;
>>> +  esac
>>> +
>> this of course prevents building of roms by actually disabling all
>> target compilers...
>
> Yeah, two asterisks are missing.  I'll send out a proper patch.

I tried this:

@@ -1866,6 +1866,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" ;;

>
> Paolo
Paolo Bonzini Oct. 14, 2022, 8:52 a.m. UTC | #4
On 10/14/22 10:13, Alex Bennée wrote:
> @@ -1866,6 +1866,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" ;;

There's another problem with i386-softmmu/x86_64-softmmu using the same 
firmware (PPC too).  See "[PATCH] configure: don't enable firmware for 
targets that are not built".

Paolo
diff mbox series

Patch

diff --git a/configure b/configure
index 45ee6f4eb3..246651f25d 100755
--- a/configure
+++ b/configure
@@ -1866,6 +1866,11 @@  probe_target_compiler() {
   container_cross_ranlib=
   container_cross_strip=
 
+  case " $target_list " in
+    " $1 ") ;;
+    *) return 1 ;;
+  esac
+
   target_arch=${1%%-*}
   case $target_arch in
     aarch64) container_hosts="x86_64 aarch64" ;;