Re: [PATCH 0/2] Initial ergonomic improvements to scripts/Kconfig.toolchain
From: Nicolas Schier
Date: Fri Oct 09 2026 - 15:48:41 EST
On Fri, Oct 09, 2026 at 09:14:02PM +0200, Nathan Chancellor wrote:
> On Thu, Oct 08, 2026 at 11:56:13PM -0700, Kees Cook wrote:
> > On Wed, Oct 07, 2026 at 06:48:40PM +0200, Nicolas Schier wrote:
> > > When I look into the resulting .config, I'd wish, these empty string
> > > kconfig symbols could be unset, e.g.
> > >
> > > # CONFIG_CC_OPT_WNO_FORMAT_TRUNCATION_NON_KPRINTF is not set
> > > # CONFIG_CC_OPT_WNO_DEFAULT_CONST_INIT_UNSAFE is not set
> > > CONFIG_CC_OPT_WNO_DANGLING_POINTER="-Wno-dangling-pointer"
> > > CONFIG_CC_OPT_WVLA_LARGER_THAN="-Wvla-larger-than=1"
> > > CONFIG_CC_HAS_WSTRINGOP_OVERFLOW=y
> > >
> > > instead of the current:
> > >
> > > CONFIG_CC_OPT_WNO_FORMAT_TRUNCATION_NON_KPRINTF=""
> > > CONFIG_CC_OPT_WNO_DEFAULT_CONST_INIT_UNSAFE=""
> > > CONFIG_CC_OPT_WNO_DANGLING_POINTER="-Wno-dangling-pointer"
> > > CONFIG_CC_OPT_WVLA_LARGER_THAN="-Wvla-larger-than=1"
> > > CONFIG_CC_HAS_WSTRINGOP_OVERFLOW=y
> > >
> > > but that would make things unneccessary more complicated, right now.
> >
> > Yeah, it may be worth documenting somewhere that "CONFIG_CC_OPT_..."
> > will have empty strings, and if someone wants to test _availability_ of
> > a feature, they need to still create and use CONFIG_CC_HAS_... ?
>
> I don't mind writing something up but where would be the best place to
> stick that? In scripts/Kconfig.toolchain or somewhere else?
Yes, I think scripts/Kconfig.toolchain is a good location (at least for
a pointer); but Documentation/kbuild/kconfig-language.rst should
probably also mention the new default way for compiler flag probing.
--
Nicolas