Re: [PATCH 1/3] kbuild: Change CFI_CLANG to depend on __builtin_function_start
From: Sami Tolvanen
Date: Mon Apr 04 2022 - 17:27:14 EST
On Sat, Apr 2, 2022 at 6:32 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> On Sat, Apr 2, 2022 at 5:19 AM Sami Tolvanen <samitolvanen@xxxxxxxxxx> 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.