Commit 546b1c9e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull bootconfig updates from Masami Hiramatsu:

 - Allow overriding CFLAGS and LDFLAGS for tools/bootconfig, for example
   making it a static binary.

* tag 'bootconfig-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tools/bootconfig: specify LDFLAGS as an argument to CC
  tools/bootconfig: allow overriding CFLAGS assignment
parents c8be5424 d81bab11
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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))
@@ -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)