Re: [PATCH v3 18/30] tools: nolibc: Append extra cflags

From: Thomas Weißschuh

Date: Mon Mar 09 2026 - 18:21:22 EST


Hi Leo,

On 2026-03-08 16:46:23+0000, Leo Yan wrote:
> Append EXTRA_CFLAGS to CFLAGS so that additional flags can be applied to
> the compiler.
>
> Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
> ---
> tools/include/nolibc/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
> index 1958dda988954d8a604b28f5feb75ebb67ee2e14..b7f0385ccba14fdaa08aab6192acf0296b47cdbc 100644
> --- a/tools/include/nolibc/Makefile
> +++ b/tools/include/nolibc/Makefile
> @@ -105,7 +105,7 @@ headers_standalone: headers
> $(Q)$(MAKE) -C $(srctree) headers_install INSTALL_HDR_PATH=$(OUTPUT)sysroot
>
> CFLAGS_s390 := -m64
> -CFLAGS := $(CFLAGS_$(ARCH))
> +CFLAGS := $(CFLAGS_$(ARCH)) $(EXTRA_CFLAGS)

I don't think we need additional cflags in tools/include/nolibc.
The only thing this Makefile does is to test-compile some headers.

> headers_check: headers_standalone
> $(Q)for header in $(filter-out crt.h std.h,$(all_files)); do \


Thomas