* [Qemu-devel] [kvm-unit-tests PATCH] configure: honour $ARCH and $CROSS_COMPILE
@ 2016-11-21 18:22 Andre Przywara
2016-11-21 19:22 ` Radim Krčmář
0 siblings, 1 reply; 2+ messages in thread
From: Andre Przywara @ 2016-11-21 18:22 UTC (permalink / raw)
To: Andrew Jones; +Cc: kvmarm, kvm, qemu-devel
Both environment variables seem to be standard in cross-compilation
environments, especially with Linux.
Let the configure script take those into account when setting the default
values for --arch and --cross-prefix. Explicitly specifying the latter
on the configure command line still works as expected.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
Hi,
this maybe a personal itch to scratch here, since I set these two
variables in my environment via a (sourced) script here and never have
to care about the particular cross-compiler prefix, for instance.
It looks rather generic, though, so I was wondering if this is useful
upstream as well.
Cheers,
Andre.
configure | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 995c8fa..9bb38ba 100755
--- a/configure
+++ b/configure
@@ -8,8 +8,9 @@ objdump=objdump
ar=ar
addr2line=addr2line
arch=`uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/'`
+[ -n "$ARCH" ] && arch="$ARCH"
host=$arch
-cross_prefix=
+cross_prefix=${CROSS_COMPILE}
endian=""
pretty_print_stacks=yes
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [kvm-unit-tests PATCH] configure: honour $ARCH and $CROSS_COMPILE
2016-11-21 18:22 [Qemu-devel] [kvm-unit-tests PATCH] configure: honour $ARCH and $CROSS_COMPILE Andre Przywara
@ 2016-11-21 19:22 ` Radim Krčmář
0 siblings, 0 replies; 2+ messages in thread
From: Radim Krčmář @ 2016-11-21 19:22 UTC (permalink / raw)
To: Andre Przywara; +Cc: Andrew Jones, kvmarm, kvm, qemu-devel
2016-11-21 18:22+0000, Andre Przywara:
> Both environment variables seem to be standard in cross-compilation
> environments, especially with Linux.
> Let the configure script take those into account when setting the default
> values for --arch and --cross-prefix. Explicitly specifying the latter
> on the configure command line still works as expected.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Hi,
>
> this maybe a personal itch to scratch here, since I set these two
> variables in my environment via a (sourced) script here and never have
> to care about the particular cross-compiler prefix, for instance.
> It looks rather generic, though, so I was wondering if this is useful
> upstream as well.
Definitely useful, thanks.
> diff --git a/configure b/configure
> @@ -8,8 +8,9 @@ objdump=objdump
> ar=ar
> addr2line=addr2line
> arch=`uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/'`
> +[ -n "$ARCH" ] && arch="$ARCH"
> host=$arch
Host should be set before we override arch, though.
I can swap those two lines when applying, but would prefer something
like:
host=`uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/'`
arch=${ARCH:-$host}
> -cross_prefix=
> +cross_prefix=${CROSS_COMPILE}
> endian=""
> pretty_print_stacks=yes
(And --help is not printing the default value for cross_prefix, which
would be nice to change when we can have a non-empty one now.)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-21 19:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21 18:22 [Qemu-devel] [kvm-unit-tests PATCH] configure: honour $ARCH and $CROSS_COMPILE Andre Przywara
2016-11-21 19:22 ` Radim Krčmář
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).