From 9c8cedef3d2d55a327c5122fe7cdff0e1fd8a157 Mon Sep 17 00:00:00 2001 From: Brian Masney Date: Fri, 28 Mar 2025 14:38:57 -0400 Subject: tools/bootconfig: allow overriding CFLAGS assignment Allow overriding the CFLAGS assignment so that the user can pass in an outside value. Link: https://lore.kernel.org/all/20250328183858.1417835-2-bmasney@redhat.com/ Signed-off-by: Brian Masney Signed-off-by: Masami Hiramatsu (Google) --- tools/bootconfig/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bootconfig/Makefile b/tools/bootconfig/Makefile index 566c3e0ee561..d2713902ca5c 100644 --- a/tools/bootconfig/Makefile +++ b/tools/bootconfig/Makefile @@ -10,7 +10,7 @@ srctree := $(patsubst %/,%,$(dir $(srctree))) endif LIBSRC = $(srctree)/lib/bootconfig.c $(srctree)/include/linux/bootconfig.h -CFLAGS = -Wall -g -I$(CURDIR)/include +override CFLAGS += -Wall -g -I$(CURDIR)/include ALL_TARGETS := bootconfig ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS)) -- cgit v1.2.3 From d81bab116b485643a08f2147165cc257b3734188 Mon Sep 17 00:00:00 2001 From: Brian Masney Date: Fri, 28 Mar 2025 14:38:58 -0400 Subject: tools/bootconfig: specify LDFLAGS as an argument to CC Explicitly specify LDFLAGS as an argument to CC so that this can be overridden by the user. Link: https://lore.kernel.org/all/20250328183858.1417835-3-bmasney@redhat.com/ Signed-off-by: Brian Masney Signed-off-by: Masami Hiramatsu (Google) --- tools/bootconfig/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bootconfig/Makefile b/tools/bootconfig/Makefile index d2713902ca5c..90eb47c9d8de 100644 --- a/tools/bootconfig/Makefile +++ b/tools/bootconfig/Makefile @@ -18,7 +18,7 @@ ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS)) all: $(ALL_PROGRAMS) test $(OUTPUT)bootconfig: main.c include/linux/bootconfig.h $(LIBSRC) - $(CC) $(filter %.c,$^) $(CFLAGS) -o $@ + $(CC) $(filter %.c,$^) $(CFLAGS) $(LDFLAGS) -o $@ test: $(ALL_PROGRAMS) test-bootconfig.sh ./test-bootconfig.sh $(OUTPUT) -- cgit v1.2.3