Messages in this thread | | | From | Nick Desaulniers <> | Date | Tue, 17 Aug 2021 11:47:43 -0700 | Subject | Re: [PATCH 2/2] x86, Makefile: Add new generic x86-64 settings v2/v3/v4 |
| |
On Tue, Aug 17, 2021 at 11:31 AM Tor Vic <torvic9@mailbox.org> 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
| |