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

From: Nicolas Schier

Date: Fri Oct 09 2026 - 04:50:48 EST


On Thu, Oct 08, 2026 at 11:54:30PM -0700, Kees Cook wrote:
> 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)?

Yes, probing compiler flags via Kconfig results in more
useless probing calls. That's unfortunate, but the move to Kconfig look
still reasonable to me due.

--
Nicolas