Message ID | 20221206102838.272584-1-bjorn@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 17961a37ce4077ae43128ba5ce0b1dfd8f02fdb9 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] selftests: net: Fix O=dir builds | expand |
Hello: This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <kuba@kernel.org>: On Tue, 6 Dec 2022 11:28:38 +0100 you wrote: > From: Björn Töpel <bjorn@rivosinc.com> > > The BPF Makefile in net/bpf did incorrect path substitution for O=dir > builds, e.g. > > make O=/tmp/kselftest headers > make O=/tmp/kselftest -C tools/testing/selftests > > [...] Here is the summary with links: - [net-next] selftests: net: Fix O=dir builds https://git.kernel.org/netdev/net-next/c/17961a37ce40 You are awesome, thank you!
diff --git a/tools/testing/selftests/net/bpf/Makefile b/tools/testing/selftests/net/bpf/Makefile index a26cb94354f6..4abaf16d2077 100644 --- a/tools/testing/selftests/net/bpf/Makefile +++ b/tools/testing/selftests/net/bpf/Makefile @@ -12,7 +12,7 @@ CCINCLUDE += -I$(SCRATCH_DIR)/include BPFOBJ := $(BUILD_DIR)/libbpf/libbpf.a -MAKE_DIRS := $(BUILD_DIR)/libbpf +MAKE_DIRS := $(BUILD_DIR)/libbpf $(OUTPUT)/bpf $(MAKE_DIRS): mkdir -p $@ @@ -37,8 +37,8 @@ endif CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH)) -$(TEST_CUSTOM_PROGS): $(BPFOBJ) - $(CLANG) -O2 -target bpf -c $(@:.o=.c) $(CCINCLUDE) $(CLANG_SYS_INCLUDES) -o $@ +$(TEST_CUSTOM_PROGS): $(OUTPUT)/%.o: %.c $(BPFOBJ) | $(MAKE_DIRS) + $(CLANG) -O2 -target bpf -c $< $(CCINCLUDE) $(CLANG_SYS_INCLUDES) -o $@ $(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile) \ $(APIDIR)/linux/bpf.h \