* [Qemu-devel] [PATCH] qemu: Fix cross compilation for mipsel
@ 2013-08-27 16:02 James Hogan
2013-08-27 18:39 ` Richard Henderson
0 siblings, 1 reply; 3+ messages in thread
From: James Hogan @ 2013-08-27 16:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Sanjay Lal, James Hogan, Andreas Färber, qemu-stable
The configure script was setting HOST_WORDS_BIGENDIAN for all $cpu =
mips|mips64 when cross compiling, since endianness cannot be detected by
running a test program. This includes little endian MIPS though. It
didn't cause any build errors but does prevent QEMU from working
correctly. Instead, detect the endianness similar to how we do for ARM,
by checking for the __MIPSEB__ builtin processor definition.
This is from a hunk in the "[PATCH 8/12] KVM/MIPS: Enable KVM/MIPS for
MIPS targets. Add MIPS GIC code to the build" patch by Sanjay Lal [1].
[1] https://patchwork.kernel.org/patch/2207251/
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Andreas Färber <afaerber@suse.de>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Cc: qemu-stable@nongnu.org
---
configure | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 0a55c20..a765a9f 100755
--- a/configure
+++ b/configure
@@ -1415,7 +1415,12 @@ case "$cpu" in
bigendian=yes
fi
;;
- hppa|m68k|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64)
+ mips|mips64)
+ if check_define __MIPSEB__; then
+ bigendian=yes
+ fi
+ ;;
+ hppa|m68k|ppc|ppc64|s390|s390x|sparc|sparc64)
bigendian=yes
;;
esac
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu: Fix cross compilation for mipsel
2013-08-27 16:02 [Qemu-devel] [PATCH] qemu: Fix cross compilation for mipsel James Hogan
@ 2013-08-27 18:39 ` Richard Henderson
2013-08-28 8:25 ` James Hogan
0 siblings, 1 reply; 3+ messages in thread
From: Richard Henderson @ 2013-08-27 18:39 UTC (permalink / raw)
To: James Hogan; +Cc: Sanjay Lal, Mike Frysinger, qemu-devel, Andreas Färber
On 08/27/2013 09:02 AM, James Hogan wrote:
> The configure script was setting HOST_WORDS_BIGENDIAN for all $cpu =
> mips|mips64 when cross compiling, since endianness cannot be detected by
> running a test program. This includes little endian MIPS though. It
> didn't cause any build errors but does prevent QEMU from working
> correctly. Instead, detect the endianness similar to how we do for ARM,
> by checking for the __MIPSEB__ builtin processor definition.
>
> This is from a hunk in the "[PATCH 8/12] KVM/MIPS: Enable KVM/MIPS for
> MIPS targets. Add MIPS GIC code to the build" patch by Sanjay Lal [1].
Redundant with Mike Frysinger's more general patch,
http://patchwork.ozlabs.org/patch/256001/
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu: Fix cross compilation for mipsel
2013-08-27 18:39 ` Richard Henderson
@ 2013-08-28 8:25 ` James Hogan
0 siblings, 0 replies; 3+ messages in thread
From: James Hogan @ 2013-08-28 8:25 UTC (permalink / raw)
To: Richard Henderson
Cc: Sanjay Lal, Mike Frysinger, qemu-devel, Andreas Färber
On 27/08/13 19:39, Richard Henderson wrote:
> On 08/27/2013 09:02 AM, James Hogan wrote:
>> The configure script was setting HOST_WORDS_BIGENDIAN for all $cpu =
>> mips|mips64 when cross compiling, since endianness cannot be detected by
>> running a test program. This includes little endian MIPS though. It
>> didn't cause any build errors but does prevent QEMU from working
>> correctly. Instead, detect the endianness similar to how we do for ARM,
>> by checking for the __MIPSEB__ builtin processor definition.
>>
>> This is from a hunk in the "[PATCH 8/12] KVM/MIPS: Enable KVM/MIPS for
>> MIPS targets. Add MIPS GIC code to the build" patch by Sanjay Lal [1].
>
> Redundant with Mike Frysinger's more general patch,
>
> http://patchwork.ozlabs.org/patch/256001/
Even better. Thanks for pointing that out. I've added my tested-by.
Cheers
James
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-28 8:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 16:02 [Qemu-devel] [PATCH] qemu: Fix cross compilation for mipsel James Hogan
2013-08-27 18:39 ` Richard Henderson
2013-08-28 8:25 ` James Hogan
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).