From: Brendan Jackman Date: Thu, 28 Aug 2025 12:28:00 +0000 (+0000) Subject: tools: testing: support EXTRA_CFLAGS in shared.mk X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=953dad21bb691b77265bf5a9acdec5769596b8e0;p=users%2Fhch%2Fmisc.git tools: testing: support EXTRA_CFLAGS in shared.mk This allows the user to set cflags when building tests that use this shared build infrastructure. For example, it enables building with -Werror so that patch-check scripts will fail: make -C tools/testing/vma -j EXTRA_CFLAGS=-Werror Link: https://lkml.kernel.org/r/20250828-b4-vma-no-atomic-h-v2-3-02d146a58ed2@google.com Signed-off-by: Brendan Jackman Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Acked-by: Pedro Falcato Cc: Jann Horn Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- diff --git a/tools/testing/shared/shared.mk b/tools/testing/shared/shared.mk index 937aaa762332..5bcdf26c8a9d 100644 --- a/tools/testing/shared/shared.mk +++ b/tools/testing/shared/shared.mk @@ -4,6 +4,7 @@ include ../../scripts/Makefile.arch CFLAGS += -I../shared -I. -I../../include -I../../arch/$(SRCARCH)/include \ -I../../../lib -g -Og -Wall \ -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined +CFLAGS += $(EXTRA_CFLAGS) LDFLAGS += -fsanitize=address -fsanitize=undefined LDLIBS += -lpthread -lurcu LIBS := slab.o find_bit.o bitmap.o hweight.o vsprintf.o