[PATCH] sched_ext: tools: Removing duplicate targets during non-cross compilation

Rong Tao posted 1 patch 1 week, 6 days ago
tools/sched_ext/Makefile | 2 ++
1 file changed, 2 insertions(+)
[PATCH] sched_ext: tools: Removing duplicate targets during non-cross compilation
Posted by Rong Tao 1 week, 6 days ago
From: Rong Tao <rongtao@cestc.cn>

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 <rongtao@cestc.cn>
---
 tools/sched_ext/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/sched_ext/Makefile b/tools/sched_ext/Makefile
index d68780e2e03d..0f2bffa3365a 100644
--- a/tools/sched_ext/Makefile
+++ b/tools/sched_ext/Makefile
@@ -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						\
-- 
2.51.1
Re: [PATCH] sched_ext: tools: Removing duplicate targets during non-cross compilation
Posted by Tejun Heo 1 week, 4 days ago
Applied to sched_ext/for-6.19.

Thanks.
--
tejun