diff mbox

[RFC,for,2.8,2/3] configure: filter 64 bit machines on 32 bit builds

Message ID 1470758127-17769-3-git-send-email-alex.bennee@linaro.org
State New
Headers show

Commit Message

Alex Bennée Aug. 9, 2016, 3:55 p.m. UTC
If the user doesn't specify any targets we build a default_target_list
from the target .mak fragements. If we don't filter out the 64 bit
targets when building on 32 bit machines we'll error out later on.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 configure | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

-- 
2.7.4

Comments

Peter Maydell Aug. 9, 2016, 4:15 p.m. UTC | #1
On 9 August 2016 at 16:55, Alex Bennée <alex.bennee@linaro.org> wrote:
> If the user doesn't specify any targets we build a default_target_list

> from the target .mak fragements. If we don't filter out the 64 bit

> targets when building on 32 bit machines we'll error out later on.

>

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  configure | 16 +++++++++++++++-

>  1 file changed, 15 insertions(+), 1 deletion(-)

>

> diff --git a/configure b/configure

> index 7b779c1..5499dbc 100755

> --- a/configure

> +++ b/configure

> @@ -1252,7 +1252,21 @@ if [ "$bsd_user" = "yes" ]; then

>  fi

>

>  for config in $mak_wilds; do

> -    default_target_list="${default_target_list} $(basename "$config" .mak)"

> +

> +    target=$(basename "$config" .mak)

> +

> +    if test "$cpu_width" = "32"; then

> +        case $target in

> +            *64*|s390x-*)

> +                # skip 64 bit machines

> +                ;;

> +            *)

> +                default_target_list="${default_target_list} ${target}"

> +                ;;

> +        esac

> +    else

> +        default_target_list="${default_target_list} ${target}"

> +    fi

>  done


Ah, this is where the default target list gets updated.
You need to squash this into patch 1 or you break bisection
on 32-bit hosts.

thanks
-- PMM
Alex Bennée Aug. 9, 2016, 7:08 p.m. UTC | #2
Squash or move to the position before?

On 9 August 2016 at 17:15, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 9 August 2016 at 16:55, Alex Bennée <alex.bennee@linaro.org> wrote:

>> If the user doesn't specify any targets we build a default_target_list

>> from the target .mak fragements. If we don't filter out the 64 bit

>> targets when building on 32 bit machines we'll error out later on.

>>

>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

>> ---

>>  configure | 16 +++++++++++++++-

>>  1 file changed, 15 insertions(+), 1 deletion(-)

>>

>> diff --git a/configure b/configure

>> index 7b779c1..5499dbc 100755

>> --- a/configure

>> +++ b/configure

>> @@ -1252,7 +1252,21 @@ if [ "$bsd_user" = "yes" ]; then

>>  fi

>>

>>  for config in $mak_wilds; do

>> -    default_target_list="${default_target_list} $(basename "$config" .mak)"

>> +

>> +    target=$(basename "$config" .mak)

>> +

>> +    if test "$cpu_width" = "32"; then

>> +        case $target in

>> +            *64*|s390x-*)

>> +                # skip 64 bit machines

>> +                ;;

>> +            *)

>> +                default_target_list="${default_target_list} ${target}"

>> +                ;;

>> +        esac

>> +    else

>> +        default_target_list="${default_target_list} ${target}"

>> +    fi

>>  done

>

> Ah, this is where the default target list gets updated.

> You need to squash this into patch 1 or you break bisection

> on 32-bit hosts.

>

> thanks

> -- PMM




-- 
Alex Bennée
KVM/QEMU Hacker for Linaro
Peter Maydell Aug. 9, 2016, 7:11 p.m. UTC | #3
On 9 August 2016 at 20:08, Alex Bennée <alex.bennee@linaro.org> wrote:
> Squash or move to the position before?


There's not much code here and in any case it assumes
the existence of variables only set in the previous
patch, so I'd just squash.

PS:

>>> +    if test "$cpu_width" = "32"; then

>>> +        case $target in

>>> +            *64*|s390x-*)

>>> +                # skip 64 bit machines


...this is adding another place that's listing all 64-bit
targets and which would need to be changed if we add another
64-bit target in future.

thanks
-- PMM
diff mbox

Patch

diff --git a/configure b/configure
index 7b779c1..5499dbc 100755
--- a/configure
+++ b/configure
@@ -1252,7 +1252,21 @@  if [ "$bsd_user" = "yes" ]; then
 fi
 
 for config in $mak_wilds; do
-    default_target_list="${default_target_list} $(basename "$config" .mak)"
+
+    target=$(basename "$config" .mak)
+
+    if test "$cpu_width" = "32"; then
+        case $target in
+            *64*|s390x-*)
+                # skip 64 bit machines
+                ;;
+            *)
+                default_target_list="${default_target_list} ${target}"
+                ;;
+        esac
+    else
+        default_target_list="${default_target_list} ${target}"
+    fi
 done
 
 if test x"$show_help" = x"yes" ; then