* [Qemu-devel] [PATCH] configure: change endian cross compilation test
@ 2012-03-14 16:36 Stuart Yoder
2012-03-14 16:54 ` Paul Brook
0 siblings, 1 reply; 5+ messages in thread
From: Stuart Yoder @ 2012-03-14 16:36 UTC (permalink / raw)
To: qemu-devel; +Cc: aliguori, paul, Stuart Yoder
From: Stuart Yoder <stuart.yoder@freescale.com>
Previous check in configure's endian test was to determine if
this is a cross-compile build by testing whether --cross-prefix
was used. This does not work for cross build environments
like Yocto that may set CC instead of --cross-prefix.
Instead, test whether host compiler is same as target compiler,
which also works when --cross-prefix is used.
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
configure | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/configure b/configure
index fe4fc4f..c5333bf 100755
--- a/configure
+++ b/configure
@@ -1269,7 +1269,7 @@ feature_not_found() {
exit 1;
}
-if test -z "$cross_prefix" ; then
+if test $cc = $host_cc; then
# ---
# big/little endian test
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [Qemu-devel] [PATCH] configure: change endian cross compilation test
2012-03-14 16:36 [Qemu-devel] [PATCH] configure: change endian cross compilation test Stuart Yoder
@ 2012-03-14 16:54 ` Paul Brook
2012-03-14 17:17 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Paul Brook @ 2012-03-14 16:54 UTC (permalink / raw)
To: Stuart Yoder; +Cc: aliguori, qemu-devel
> From: Stuart Yoder <stuart.yoder@freescale.com>
>
> Previous check in configure's endian test was to determine if
> this is a cross-compile build by testing whether --cross-prefix
> was used. This does not work for cross build environments
> like Yocto that may set CC instead of --cross-prefix.
>
> Instead, test whether host compiler is same as target compiler,
> which also works when --cross-prefix is used.
I'd much rather remove this test altogether. If the cross case doesn't give
the right answer for all the host systems we care about then we should fix
that.
Paul
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] configure: change endian cross compilation test
2012-03-14 16:54 ` Paul Brook
@ 2012-03-14 17:17 ` Peter Maydell
[not found] ` <CALRxmdAhwT-2p2VaO2mpN7sLr46BTBZRBkXsWWpoCd=UBH5PNQ@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2012-03-14 17:17 UTC (permalink / raw)
To: Paul Brook; +Cc: aliguori, Stuart Yoder, qemu-devel
2012/3/14 Paul Brook <paul@codesourcery.com>:
>> From: Stuart Yoder <stuart.yoder@freescale.com>
>>
>> Previous check in configure's endian test was to determine if
>> this is a cross-compile build by testing whether --cross-prefix
>> was used. This does not work for cross build environments
>> like Yocto that may set CC instead of --cross-prefix.
Do we even support not using --cross-prefix ? I'd have expected just
setting CC to run into random problems like using the host arch's
version of strip rather than the cross toolchain, the host's
pkg-config rather than the one that knows where the cross libraries
are, etc etc.
>> Instead, test whether host compiler is same as target compiler,
>> which also works when --cross-prefix is used.
>
> I'd much rather remove this test altogether. If the cross case doesn't give
> the right answer for all the host systems we care about then we should fix
> that.
Agreed. I think looking at the host CPUs we support the only ones
that aren't guaranteed either big or little endian are (a) mips
and (b) ARM. ARM already identifies big-endian by a compile-time
check, and it seems likely that MIPS could too.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-14 19:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-14 16:36 [Qemu-devel] [PATCH] configure: change endian cross compilation test Stuart Yoder
2012-03-14 16:54 ` Paul Brook
2012-03-14 17:17 ` Peter Maydell
[not found] ` <CALRxmdAhwT-2p2VaO2mpN7sLr46BTBZRBkXsWWpoCd=UBH5PNQ@mail.gmail.com>
2012-03-14 18:09 ` Peter Maydell
2012-03-14 19:00 ` Stefan Weil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.