Message ID | 20230202104111.12317-1-phil@nwl.cc (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | tools/vm/Makefile: Honor EXTRA_* flags | expand |
diff --git a/tools/vm/Makefile b/tools/vm/Makefile index 9860622cbb151..ce1ed324d6c01 100644 --- a/tools/vm/Makefile +++ b/tools/vm/Makefile @@ -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)
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. Signed-off-by: Phil Sutter <phil@nwl.cc> Cc: Dave Young <dyoung@redhat.com> --- Please keep me in Cc, I'm not subscribed to this list. --- tools/vm/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)