Re: [PATCH 1/2] scripts/Kconfig.toolchain: Drop compiler symbols from dependencies

From: Kees Cook

Date: Fri Oct 09 2026 - 02:57:13 EST


On Wed, Oct 07, 2026 at 05:22:21PM +0200, Nathan Chancellor wrote:
> Commit 454e00cf8ee5 ("kbuild: avoid re-running compiler and linker
> probes") moved many cc-option calls from the main Makefile into Kconfig.
> In the process, code such as
>
> ifdef CONFIG_CC_IS_GCC
> KBUILD_CFLAGS += $(call cc-option,-foo)
> endif
>
> was converted into Kconfig as
>
> config CC_OPT_FOO
> def_string "$(cc-option-str,-foo)" if CC_IS_GCC
>
> The 'if CC_IS_GCC' is generally unnecessary because it does not prevent
> the cc-option-str call from running (which is the primary reason the
> ifdef guards exists in the Makefile), as cc-option-str and the like are
> run before Kconfig even parses the dependency. It only impacts the
> symbol's visibility, which does not really matter in the general case,
> so remove these dependencies.

Hm, does this mean we're running more probes at start-up now compared to
before (since the Makefile idef would have suppressed them)?

> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>

Regardless:

Reviewed-by: Kees Cook <kees@xxxxxxxxxx>

--
Kees Cook