[Top][All Lists]

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

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

From: Michael Tokarev
Subject: Re: [PATCH] configure: normalize riscv* cpu types too
Date: Sat, 4 Feb 2023 18:14:30 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

04.02.2023 18:05, Peter Maydell пишет:
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".

This all makes perfect sense, thank you Peter for explaining.

I already told the original reporter (on IRC) that it looks
like what they're doing is wrong, just using proper CC (or
--cross-prefix) should DTRT, and it turned out they don't
even remember anymore why they've put this --cpu= there.

The current code in ./configure just looked incomplete to
me, so I went on and sent a patch to make it more, in my
view, uniform.

It is for the better that it is not needed.


reply via email to

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