Re: [PATCH v3 10/20] kbuild: move the toolchain checks into init/Kconfig.toolchain
From: Lorenzo Stoakes (ARM)
Date: Fri Sep 18 2026 - 10:56:57 EST
On Thu, Sep 17, 2026 at 06:07:29PM -0700, Nathan Chancellor wrote:
> On Thu, Sep 17, 2026 at 11:53:13AM -0700, Kees Cook wrote:
> > On Thu, Sep 17, 2026 at 05:06:20PM +0100, Lorenzo Stoakes (ARM) wrote:
> > > Move them into their own file, sourced from the top of init/Kconfig, so
> > > that the next commit can add to them without growing init/Kconfig further.
> > >
> > > No functional change.
> > >
> > > Assisted-by: LLM
> > > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
> > > ---
> > > init/Kconfig | 197 +-----------------------------------------------
> > > init/Kconfig.toolchain | 198 +++++++++++++++++++++++++++++++++++++++++++++++++
> > > 2 files changed, 199 insertions(+), 196 deletions(-)
> >
> > Yeah, totally right to move to a separate file. I think, however, I
> > would prefer this wasn't in init/ though. Kbuild uses scripts/ as its
> > Makefile.$topic dumping ground, and Kconfig.include also lives there. To
> > me, this new file should be scripts/Kconfig.toolchain instead. And
> > arguably, this should be included by the top-level Kconfig rather than
> > init/Kconfig...
> >
> > I defer to kbuild folks, though.
>
> We talked about this previously:
>
> https://lore.kernel.org/aqPW1FsBVYHSWl1r@gremlin/
>
> I do feel like scripts/ is a better location given that these are really
> things internal to Kbuild but I also see where Lorenzo is coming from
> that scripts/ is a little weird for this to live for discoverability,
> especially if we want people to put checks here instead of in a Makefile
> directly. To be honest, it would be kind of nice to separate the Kbuild
> parts of scripts into their own directory to make it clear what Kbuild
> uses versus what users/contributors should use but that is obviously too
> big of a project to tackle as a prerequisite for this.
Yeah it just seemed really weird/surprising to me (in the sense of
'principle of least surprise') to put that in scripts/ and it doesn't seem
that traditionally anything else like this lives there.
But if you guys feel strongly enough I can put it there.
And agreed probably a 'third place' is the right way, but probably not
right as part of this series :)
>
> --
> Cheers,
> Nathan
--
Cheers, Lorenzo