Re: [PATCH] klp-build: Allow passing options to make via '--'

From: Dylan Hatch

Date: Thu Nov 12 2026 - 14:07:56 EST


On Wed, Nov 11, 2026 at 10:14 PM Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> On Tue, Nov 03, 2026 at 11:39:09PM +0000, Dylan Hatch wrote:
> > Livepatch builds rely on reproducing the original kernel build
> > environment. Currently, klp-build invokes bare 'make', which drops any
> > command-line variables or flags used during the original build (such as
> > 'LLVM=1', 'CC=...', 'KBUILD_BUILD_TIMESTAMP=...', or custom wrapper
> > Makefiles via '-f').
> >
> > Refactor the make invocations to use a common MAKE array and allow
> > passing arbitrary make options after '--' on the klp-build command line:
> >
> > klp-build [OPTIONS] PATCH_FILE(s) [-- MAKE_OPTIONS]
> >
> > Signed-off-by: Dylan Hatch <dylanbhatch@xxxxxxxxxx>
>
> Does this enable anything that's not already possible via setting those
> variables in the environment (or MAKEFLAGS), e.g.:
>
> LLVM=1 klp-build
>
> ?

Ah, I hadn't tried MAKEFLAGS, thanks for the pointer.

Since Makefiles override env vars by default I had some issues with
our internal Makefile-based build tool, but trying with MAKEFLAGS it
does seem to work. In which case, this patch doesn't really add any
new optionality.

I would argue the [-- MAKE_OPTIONS] still has some value in that it
makes for a slightly more intuitive command line interface, but that
is just my subjective opinion.

Thanks,
Dylan