Skip to contentSkip to conversation

tools/vm/Makefile: Honor EXTRA_* flags

PATCH New Phil Sutter 1 participant 1 message Feb 2, 2023 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/vm/Makefile: Honor EXTRA_* flags

Passing custom compiler flags is pretty much impossible otherwise due to the way standard variables CFLAGS and LDFLAGS are being assigned to.

The recursive make call in tools/lib/api already supports EXTRA_CFLAGS at least, so follow this path instead of reinventing the wheel.

---
Please keep me in Cc, I'm not subscribed to this list.

---
 tools/vm/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/vm/Makefile +2 -2
index 9860622cbb151..ce1ed324d6c01 100644
@@ -8,8 +8,8 @@ TARGETS=page-types slabinfo page_owner_sort
 LIB_DIR = ../lib/api
 LIBS = $(LIB_DIR)/libapi.a
 
-CFLAGS = -Wall -Wextra -I../lib/
-LDFLAGS = $(LIBS)
+CFLAGS = -Wall -Wextra -I../lib/ $(EXTRA_CFLAGS)
+LDFLAGS = $(LIBS) $(EXTRA_LDFLAGS)
 
 all: $(TARGETS)
 
Signature · 1 line
2.38.0