diff mbox series

configure: detect --cpu=mipsisa64r6

Message ID 20240619114616.251610-1-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series configure: detect --cpu=mipsisa64r6 | expand

Commit Message

Paolo Bonzini June 19, 2024, 11:46 a.m. UTC
Treat it as a MIPS64 machine.

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

Comments

Thomas Huth June 19, 2024, 12:49 p.m. UTC | #1
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
Paolo Bonzini June 19, 2024, 1:34 p.m. UTC | #2
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
Philippe Mathieu-Daudé June 19, 2024, 4:26 p.m. UTC | #3
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>
Thomas Huth June 19, 2024, 5:43 p.m. UTC | #4
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>
diff mbox series

Patch

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