Re: [PATCH 2/2] x86, Makefile: Add new generic x86-64 settings v2/v3/v4

From: Nick Desaulniers
Date: Tue Aug 17 2021 - 14:48:03 EST


On Tue, Aug 17, 2021 at 11:31 AM Tor Vic <torvic9@xxxxxxxxxxx> wrote:
>
> On 17.08.21 18:22, Nick Desaulniers wrote:
> >
> > Ah, cc-option can be used from Kconfig. Perhaps a cc-option call to
> > -march=x86-64-vX with a comment about which compiler versions first
> > supported these (so that we can remove the feature test when the
> > minimum supported toolchains are advanced) would be better?
> >
>
> That makes sense. Will do a v2.
> Which of these possibilities is more "expensive"?
> I remember a recent patch where some of these calls were removed.

cc-option does "cost" more than these version checks, but it is more
concise about what we care about and they can be removed over time.
They also work better for different compilers, since it's easy to
forget to check one particular compiler, or get the compiler version
wrong, or break a pre-released compiler. We generally want to prefer
feature detection to version detection. I sent a series recently
removing stale checks.
--
Thanks,
~Nick Desaulniers