[PATCH 1/3] kbuild: Change CFI_CLANG to depend on __builtin_function_start

Sami Tolvanen samitolvanen at google.com
Mon Apr 4 12:40:46 PDT 2022


On Sat, Apr 2, 2022 at 6:32 AM Masahiro Yamada <masahiroy at kernel.org> wrote:
>
> On Sat, Apr 2, 2022 at 5:19 AM Sami Tolvanen <samitolvanen at google.com> wrote:
> >
> > Clang 14 added support for the __builtin_function_start()
> > built-in function, which allows us to implement function_nocfi()
> > without architecture-specific inline assembly. This patch changes
> > CONFIG_CFI_CLANG to depend on the built-in and effectively upgrades
> > the minimum supported compiler version for CFI to Clang 14.
>
> From this description, I think the straight-forward change would be:
>
>     depends on CLANG_VERSION >= 120000
> -->
>     depends on CLANG_VERSION >= 140000
>
> Any reason to avoid this?

I thought testing for the compiler feature was preferred, but I can
certainly just increase the minimum version number here too.

Sami



More information about the linux-arm-kernel mailing list