Re: [PATCH 5.15.y] kbuild: Allow kernel installation packaging to override pkg-config

From: Stephen Boyd
Date: Tue Jan 17 2023 - 16:48:25 EST


Quoting Greg KH (2023-01-14 05:49:09)
> On Thu, Jan 12, 2023 at 04:21:49PM -0800, Stephen Boyd wrote:
> > From: Chun-Tse Shao <ctshao@xxxxxxxxxx>
> >
> > commit d5ea4fece4508bf8e72b659cd22fa4840d8d61e5 upstream.
> >
> > Add HOSTPKG_CONFIG to allow tooling that builds the kernel to override
> > what pkg-config and parameters are used.
> >
> > Signed-off-by: Chun-Tse Shao <ctshao@xxxxxxxxxx>
> > Reviewed-by: Nick Desaulniers <ndesaulniers@xxxxxxxxxx>
> > Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> > [swboyd@xxxxxxxxxxxx: Drop certs/Makefile hunk that doesn't
> > apply because pkg-config isn't used there, add dtc/Makefile hunk to
> > fix dtb builds]
> > Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
> > ---
> >
> > I need this to properly compile 5.15.y stable kernels in the chromeos
> > build system.
>
> Is this a new issue? A regression? This feels odd to add a new build
> feature to an old kernel when nothing changed to require it other than
> an external tool suddenly requiring something new?
>

The chromeos build system checks for pkg-config being called directly
and fails the build if the proper wrapper isn't used. We set
HOSTPKG_CONFIG in the environment when building the kernel so that it
doesn't fail.

It's not exactly a new issue, but a self-inflicted one that makes
building the stable kernel annoying. I figured it was similar to fixing
problems with compiling stable kernels with newer toolchains, but if it
feels odd then I'll just have to remember to pick this patch whenever
bisecting stable trees. No worries.