qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] configure: normalize riscv* cpu types too


From: Peter Maydell
Subject: Re: [PATCH] configure: normalize riscv* cpu types too
Date: Sat, 4 Feb 2023 15:05:21 +0000

On Sat, 4 Feb 2023 at 11:26, Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> For most CPU types out there, ./configure normalizes all
> variations into base form plus, optionally, variations,
> to find the proper arch-specific code.  In particular,
> it's possible to use
>    ./configure --cpu=$(uname -m)
> and it will figure out the right base cpu family out of
> that. But this does not work for riscv64 for example,
> since there's no similar normalisation for that one.

I don't think that's something we should be encouraging
users to do. The most common case should be "configure
correctly detects the host CPU type by probing the
compiler #defines, and the user does not need to specify".
The next most common thing should be "the user has some
special-case need to override this, and they know what
they want, and they specify the right value, in this
case "riscv".

We've put in some work to get configure away from its
old habit of falling back to "guess based on uname -m",
but that default code path is for the moment still there,
and so the "canonicalize host CPU name" code also is
still present, for:
 (1) the cases when you get into that default fallback
 (2) backwards-compatibility with users who are already
     passing --cpu=armv4l or whatever

But I don't think we should expand this legacy code
and encourage users to pass more odd stuff to --cpu.

We could probably deprecate-and-drop some of the
canonicalization handling for other host architectures.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]