Re: [PATCH v3 17/30] tools: mm: Append extra cflags

From: Ian Rogers

Date: Mon Mar 09 2026 - 14:05:54 EST


On Sun, Mar 8, 2026 at 9:48 AM Leo Yan <leo.yan@xxxxxxx> 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/mm/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/mm/Makefile b/tools/mm/Makefile
> index f5725b5c23aa261994b5b42f37c443bee2edebf2..742c1639db0a6f7aee59cf8f4634cb40eacd49b2 100644
> --- a/tools/mm/Makefile
> +++ b/tools/mm/Makefile
> @@ -9,6 +9,7 @@ INSTALL_TARGETS = $(BUILD_TARGETS) thpmaps
> LIB_DIR = ../lib/api
> LIBS = $(LIB_DIR)/libapi.a
>
> +CFLAGS += $(EXTRA_CFLAGS)
> CFLAGS += -Wall -Wextra -I../lib/ -pthread

The append should probably happen last to allow the default values to
be overridden.

Thanks,
Ian

> LDFLAGS += $(LIBS) -pthread
>
>
> --
> 2.34.1
>