]> Gentwo Git Trees - linux/.git/commitdiff
sched_ext: tools: Removing duplicate targets during non-cross compilation
authorRong Tao <rongtao@cestc.cn>
Tue, 18 Nov 2025 05:37:13 +0000 (13:37 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 20 Nov 2025 17:00:27 +0000 (07:00 -1000)
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>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/sched_ext/Makefile

index 069b0bc38e5589292cf8e597c86b7a31c4202423..e4bda24740607ee011f5129bd14cabe4125cc9b9 100644 (file)
@@ -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                                                \