[PATCH] configure: detect --cpu=mipsisa64r6

Paolo Bonzini posted 1 patch 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240619114616.251610-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] configure: detect --cpu=mipsisa64r6
Posted by Paolo Bonzini 5 months, 1 week ago
Treat it as a MIPS64 machine.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index d0703ea279d..3669eec86e5 100755
--- a/configure
+++ b/configure
@@ -452,7 +452,7 @@ case "$cpu" in
     linux_arch=loongarch
     ;;
 
-  mips64*)
+  mips64*|mipsisa64*)
     cpu=mips64
     host_arch=mips
     linux_arch=mips
-- 
2.45.2
Re: [PATCH] configure: detect --cpu=mipsisa64r6
Posted by Philippe Mathieu-Daudé 5 months, 1 week ago
On 19/6/24 13:46, Paolo Bonzini wrote:
> Treat it as a MIPS64 machine.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



Re: [PATCH] configure: detect --cpu=mipsisa64r6
Posted by Thomas Huth 5 months, 1 week ago
On 19/06/2024 13.46, Paolo Bonzini wrote:
> Treat it as a MIPS64 machine.

Where did you encounter it?

> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index d0703ea279d..3669eec86e5 100755
> --- a/configure
> +++ b/configure
> @@ -452,7 +452,7 @@ case "$cpu" in
>       linux_arch=loongarch
>       ;;
>   
> -  mips64*)
> +  mips64*|mipsisa64*)

Maybe simply switch to mips*64*) ?

>       cpu=mips64
>       host_arch=mips
>       linux_arch=mips

  Thomas
Re: [PATCH] configure: detect --cpu=mipsisa64r6
Posted by Paolo Bonzini 5 months, 1 week ago
On Wed, Jun 19, 2024 at 2:49 PM Thomas Huth <thuth@redhat.com> wrote:
>
> On 19/06/2024 13.46, Paolo Bonzini wrote:
> > Treat it as a MIPS64 machine.
>
> Where did you encounter it?

It is handled by "config.sub" (the GNU script to canonicalize target
triples). and is also in the list produced by "rustc --print
target-list" on Fedora 40. So it seems like something that could be
passed to --cpu.

The argument to --cpu, plus an autodetected OS, is also as close as we
can get to building the tuple for "cargo --target
CPU-MACHINE-OS-VARIANT".

> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >   configure | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/configure b/configure
> > index d0703ea279d..3669eec86e5 100755
> > --- a/configure
> > +++ b/configure
> > @@ -452,7 +452,7 @@ case "$cpu" in
> >       linux_arch=loongarch
> >       ;;
> >
> > -  mips64*)
> > +  mips64*|mipsisa64*)
>
> Maybe simply switch to mips*64*) ?

Not sure if it's a good idea, since we know the exact prefixes.

Paolo
Re: [PATCH] configure: detect --cpu=mipsisa64r6
Posted by Thomas Huth 5 months, 1 week ago
On 19/06/2024 15.34, Paolo Bonzini wrote:
> On Wed, Jun 19, 2024 at 2:49 PM Thomas Huth <thuth@redhat.com> wrote:
>>
>> On 19/06/2024 13.46, Paolo Bonzini wrote:
>>> Treat it as a MIPS64 machine.
...
>>> diff --git a/configure b/configure
>>> index d0703ea279d..3669eec86e5 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -452,7 +452,7 @@ case "$cpu" in
>>>        linux_arch=loongarch
>>>        ;;
>>>
>>> -  mips64*)
>>> +  mips64*|mipsisa64*)
>>
>> Maybe simply switch to mips*64*) ?
> 
> Not sure if it's a good idea, since we know the exact prefixes.

Fair point.

Reviewed-by: Thomas Huth <thuth@redhat.com>