Re: [PATCH v3 04/26] configure: don't enable cross compilers unless in target_list

2023-01-02 Thread Alex Bennée


Stefan Weil  writes:

> Am 21.10.22 um 00:10 schrieb Richard Henderson:
>> On 10/20/22 21:51, Alex Bennée wrote:
>>> This avoids the unfortunate effect of always builds the pc-bios blobs
>>> for targets the user isn't interested in.
>>>
>>> Suggested-by: Paolo Bonzini 
>>> Signed-off-by: Alex Bennée 
>>> ---
>>>   configure | 9 +
>>>   1 file changed, 9 insertions(+)
>>>
>>> diff --git a/configure b/configure
>>> index 81561be7c1..dd6f58dcde 100755
>>> --- 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;
>
>
> Isn't break limited for exiting from for, while, or until loop? (*)
> If yes, it's wrongly used here. sh does not complain, but other
> shells do.

There is already a fix waiting in the PR:

  20221223172135.3450109-1-alex.ben...@linaro.org
  
>
> Stefan
>
> *) https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro



Re: [PATCH v3 04/26] configure: don't enable cross compilers unless in target_list

2023-01-02 Thread Stefan Weil via

Am 21.10.22 um 00:10 schrieb Richard Henderson:

On 10/20/22 21:51, Alex Bennée wrote:

This avoids the unfortunate effect of always builds the pc-bios blobs
for targets the user isn't interested in.

Suggested-by: Paolo Bonzini 
Signed-off-by: Alex Bennée 
---
  configure | 9 +
  1 file changed, 9 insertions(+)

diff --git a/configure b/configure
index 81561be7c1..dd6f58dcde 100755
--- 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;



Isn't break limited for exiting from for, while, or until loop? (*)
If yes, it's wrongly used here. sh does not complain, but other
shells do.

Stefan

*) https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html



Re: [PATCH v3 04/26] configure: don't enable cross compilers unless in target_list

2022-10-20 Thread Richard Henderson

On 10/20/22 21:51, Alex Bennée wrote:

This avoids the unfortunate effect of always builds the pc-bios blobs
for targets the user isn't interested in.

Suggested-by: Paolo Bonzini 
Signed-off-by: Alex Bennée 
---
  configure | 9 +
  1 file changed, 9 insertions(+)

diff --git a/configure b/configure
index 81561be7c1..dd6f58dcde 100755
--- 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" ;;


Reviewed-by: Richard Henderson 

r~



[PATCH v3 04/26] configure: don't enable cross compilers unless in target_list

2022-10-20 Thread Alex Bennée
This avoids the unfortunate effect of always builds the pc-bios blobs
for targets the user isn't interested in.

Suggested-by: Paolo Bonzini 
Signed-off-by: Alex Bennée 
---
 configure | 9 +
 1 file changed, 9 insertions(+)

diff --git a/configure b/configure
index 81561be7c1..dd6f58dcde 100755
--- 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" ;;
-- 
2.34.1