Re: [PATCH v3 10/30] tools build: Append extra cflags for feature
From: Ian Rogers
Date: Mon Mar 09 2026 - 13:54:16 EST
On Sun, Mar 8, 2026 at 9:47 AM Leo Yan <leo.yan@xxxxxxx> wrote:
>
> Append EXTRA_CFLAGS to CFLAGS so that additional flags can be applied to
> the feature build.
>
> Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
> ---
> tools/build/feature/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
> index 1fbcb3ce74d2173072748a417fc63bd9a5b13888..103d8b71e7a4e8d0979242cfc95c1c0b946222b5 100644
> --- a/tools/build/feature/Makefile
> +++ b/tools/build/feature/Makefile
> @@ -1,6 +1,8 @@
> # SPDX-License-Identifier: GPL-2.0
> include ../../scripts/Makefile.include
>
> +CFLAGS += $(EXTRA_CFLAGS)
> +
Is this necessary? In Makefile.feature:
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/build/Makefile.feature#n11
The build invocation does "CFLAGS="$(EXTRA_CFLAGS)" and so the locally
set CFLAGS appear to be ignored.
Thanks,
Ian
> FILES= \
> test-all.bin \
> test-backtrace.bin \
>
> --
> 2.34.1
>