Skip to contentSkip to conversation

sched_ext: tools: Removing duplicate targets during non-cross compilation

PATCH Applied Rong Tao 2 participants 2 messages Nov 18, 2025 – Nov 20, 2025 Scheduler - sched_ext

lore
Share & tools
lore

Rong Tao

author
#0 lore raw

PATCH 1/1 sched_ext: tools: Removing duplicate targets during non-cross compilation

From: Rong Tao <[email protected]>

When cross-compilation is not used, BPFOBJ and HOST_BPFOBJ are identical files, libbpf.a, and duplicate libbpf.a files should be removed.

---
 tools/sched_ext/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/sched_ext/Makefile +2 -0
index d68780e2e03d..0f2bffa3365a 100644
@@ -133,6 +133,7 @@ $(MAKE_DIRS):
 	$(call msg,MKDIR,,$@)
 	$(Q)mkdir -p $@
 
+ifneq ($(CROSS_COMPILE),)
 $(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile)			\
 	   $(APIDIR)/linux/bpf.h						\
 	   | $(OBJ_DIR)/libbpf
@@ -141,6 +142,7 @@ $(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile)			\
 		    EXTRA_CFLAGS='-g -O0 -fPIC'					\
 		    LDFLAGS="$(LDFLAGS)"					\
 		    DESTDIR=$(OUTPUT_DIR) prefix= all install_headers
+endif
 
 $(HOST_BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile)		\
 	   $(APIDIR)/linux/bpf.h						\
Signature · 1 line
2.51.1
reviewer Applied
#1 lore raw

Applied to sched_ext/for-6.19.

Thanks.
--
tejun