[PATCH v3 12/30] tools: counter: Append extra cflags

From: Leo Yan

Date: Sun Mar 08 2026 - 12:48:55 EST


Append EXTRA_CFLAGS to CFLAGS so that additional flags can be applied to
the compiler.

Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
---
tools/counter/Makefile | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/counter/Makefile b/tools/counter/Makefile
index d82d35a520f610260abb43f6ae28e56d73268231..c0628677af3807bdc331ce2dba92b4e5f1a25b68 100644
--- a/tools/counter/Makefile
+++ b/tools/counter/Makefile
@@ -12,6 +12,7 @@ endif
# (this improves performance and avoids hard-to-debug behaviour);
MAKEFLAGS += -r

+override CFLAGS += $(EXTRA_CFLAGS)
override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include \
-I$(srctree)/tools/include


--
2.34.1