Skip to content

Commit 06a7415

Browse files
Rtoaxhtejun
authored andcommitted
sched_ext: tools: Removing duplicate targets during non-cross compilation
When cross-compilation is not used, BPFOBJ and HOST_BPFOBJ are identical files, libbpf.a, and duplicate libbpf.a files should be removed. Signed-off-by: Rong Tao <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 348d3c5 commit 06a7415

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/sched_ext/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ $(MAKE_DIRS):
133133
$(call msg,MKDIR,,$@)
134134
$(Q)mkdir -p $@
135135

136+
ifneq ($(CROSS_COMPILE),)
136137
$(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \
137138
$(APIDIR)/linux/bpf.h \
138139
| $(OBJ_DIR)/libbpf
@@ -141,6 +142,7 @@ $(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \
141142
EXTRA_CFLAGS='-g -O0 -fPIC' \
142143
LDFLAGS="$(LDFLAGS)" \
143144
DESTDIR=$(OUTPUT_DIR) prefix= all install_headers
145+
endif
144146

145147
$(HOST_BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \
146148
$(APIDIR)/linux/bpf.h \

0 commit comments

Comments
 (0)