Skip to content

Commit 3dc1ac6

Browse files
committed
bpftool: Remove unnecessary source files from bootstrap version
Commit d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.") added new files to the list of objects to compile in order to build the bootstrap version of bpftool. As far as I can tell, these objects are unnecessary and were added by mistake; maybe a draft version intended to add support for loading loader programs from the bootstrap version. Anyway, we can remove these object files from the list to make the bootstrap bpftool binary a tad smaller and faster to build. Fixes: d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.") Signed-off-by: Quentin Monnet <[email protected]> Message-ID: <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 0cb4aaf commit 3dc1ac6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ HOST_CFLAGS = $(subst -I$(LIBBPF_INCLUDE),-I$(LIBBPF_BOOTSTRAP_INCLUDE),\
177177

178178
BPFTOOL_BOOTSTRAP := $(BOOTSTRAP_OUTPUT)bpftool
179179

180-
BOOTSTRAP_OBJS = $(addprefix $(BOOTSTRAP_OUTPUT),main.o common.o json_writer.o gen.o btf.o xlated_dumper.o btf_dumper.o disasm.o)
180+
BOOTSTRAP_OBJS = $(addprefix $(BOOTSTRAP_OUTPUT),main.o common.o json_writer.o gen.o btf.o)
181181
$(BOOTSTRAP_OBJS): $(LIBBPF_BOOTSTRAP)
182182

183183
OBJS = $(patsubst %.c,$(OUTPUT)%.o,$(SRCS)) $(OUTPUT)disasm.o
@@ -225,9 +225,6 @@ endif
225225

226226
CFLAGS += $(if $(BUILD_BPF_SKELS),,-DBPFTOOL_WITHOUT_SKELETONS)
227227

228-
$(BOOTSTRAP_OUTPUT)disasm.o: $(srctree)/src/kernel/bpf/disasm.c
229-
$(QUIET_CC)$(HOSTCC) $(HOST_CFLAGS) -c -MMD $< -o $@
230-
231228
$(OUTPUT)disasm.o: $(srctree)/src/kernel/bpf/disasm.c
232229
$(QUIET_CC)$(CC) $(CFLAGS) -c -MMD $< -o $@
233230

0 commit comments

Comments
 (0)