diff options
| author | Rong Tao <rongtao@cestc.cn> | 2025-11-18 13:37:13 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-11-20 07:00:27 -1000 |
| commit | 06a7415cf24774baf1945fc28ea152e888bd72bb (patch) | |
| tree | 73349c42b87a54c0fc9d771c104f97e89c7d6aa5 | |
| parent | 348d3c587ac6fa5aaa24ab5c71b7b5635c47e765 (diff) | |
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 <rongtao@cestc.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
| -rw-r--r-- | tools/sched_ext/Makefile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/sched_ext/Makefile b/tools/sched_ext/Makefile index 069b0bc38e55..e4bda2474060 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 \ |