Re: [PATCH v2 18/20] kconfig: add CC_HAS_CONDITION_COVERAGE for MC/DC support detection

From: Nathan Chancellor

Date: Fri Nov 13 2026 - 02:43:35 EST


> Add a Kconfig symbol to detect compiler support for -fcondition-coverage,
> which enables MC/DC (Modified Condition/Decision Coverage) instrumentation.
> This flag is available since GCC 14.
>
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---
> scripts/Kconfig.toolchain | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/Kconfig.toolchain b/scripts/Kconfig.toolchain
> index 2acbd40a38f1..76c1e794d115 100644
> --- a/scripts/Kconfig.toolchain
> +++ b/scripts/Kconfig.toolchain
> @@ -188,6 +188,9 @@ config CC_OPT_NO_ALLOW_STORE_DATA_RACES
> config CC_HAS_MNOP_MCOUNT
> def_bool $(cc-option,-mnop-mcount)
>
> +config CC_HAS_CONDITION_COVERAGE

Please add

# gcc-14: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=08a52331803f66a4aaeaedd278436ca8eac57b50
# clang: not supported

to match what I am doing for the rest of the file:

https://lore.kernel.org/20261111-kconfig-toolchain-updates-v2-6-b2d9415c1757@xxxxxxxxxx/

--
Cheers,
Nathan