* [PATCH] configure: detect 64-bit MIPS
@ 2024-10-27 13:05 Paolo Bonzini
2024-10-28 3:34 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2024-10-27 13:05 UTC (permalink / raw)
To: qemu-devel; +Cc: philmd
While right now 64-bit MIPS and 32-bit MIPS share the code in QEMU,
Rust uses different rules for the target. Set $cpu correctly to
either mips or mips64 (--cpu=mips64* is already accepted in the case
statement that canonicalizes cpu/host_arch/linux_arch), and adjust
the checks to account for the different between $cpu (which handles
mips/mips64 separately) and $host_arch (which does not).
Fixes: 1a6ef6ff624 ("configure, meson: detect Rust toolchain", 2024-10-11)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 97bd4495f86..c0ba649d309 100755
--- a/configure
+++ b/configure
@@ -395,7 +395,11 @@ elif check_define _ARCH_PPC ; then
cpu="ppc"
fi
elif check_define __mips__ ; then
- cpu="mips"
+ if check_define __mips64 ; then
+ cpu="mips64"
+ else
+ cpu="mips"
+ fi
elif check_define __s390__ ; then
if check_define __s390x__ ; then
cpu="s390x"
@@ -1230,7 +1234,7 @@ EOF
fi
fi
- case "$host_arch" in
+ case "$cpu" in
arm)
# e.g. arm-unknown-linux-gnueabi, arm-unknown-linux-gnueabihf
write_c_skeleton
@@ -1278,7 +1282,7 @@ EOF
test "$rust_arch" = arm && test "$rust_os" != linux && rust_arch=armv7
;;
- mips|mips64)
+ mips)
# preserve ISA version (mipsisa64r6 etc.) and include endianness
rust_arch=${raw_cpu%el}
test "$bigendian" = no && rust_arch=${rust_arch}el
--
2.47.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] configure: detect 64-bit MIPS
2024-10-27 13:05 [PATCH] configure: detect 64-bit MIPS Paolo Bonzini
@ 2024-10-28 3:34 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-10-28 3:34 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: Manos Pitsidianakis
On 27/10/24 10:05, Paolo Bonzini wrote:
> While right now 64-bit MIPS and 32-bit MIPS share the code in QEMU,
> Rust uses different rules for the target. Set $cpu correctly to
> either mips or mips64 (--cpu=mips64* is already accepted in the case
> statement that canonicalizes cpu/host_arch/linux_arch), and adjust
> the checks to account for the different between $cpu (which handles
> mips/mips64 separately) and $host_arch (which does not).
>
> Fixes: 1a6ef6ff624 ("configure, meson: detect Rust toolchain", 2024-10-11)
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Acked-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-28 3:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-27 13:05 [PATCH] configure: detect 64-bit MIPS Paolo Bonzini
2024-10-28 3:34 ` Philippe Mathieu-Daudé
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).