Thread (1 message) 1 message, 1 author, 2021-01-27

Re: [PATCH v2 bpf-next 3/4] bpf: runqslower: prefer use local KBUILD_OUTPUT/vmlinux or vmlinux

From: Andrii Nakryiko <hidden>
Date: 2021-01-27 21:25:13
Also in: bpf, lkml

On Tue, Jan 26, 2021 at 1:11 AM Song Liu [off-list ref] wrote:
quoted hunk
Update the Makefile to prefer using KBUILD_OUTPUT/vmlinux (for selftests)
or ../../../vmlinux. These two files should have latest definitions for
vmlinux.h.

Signed-off-by: Song Liu <redacted>
---
 tools/bpf/runqslower/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
index 4d5ca54fcd4c8..1f75c95d4d023 100644
--- a/tools/bpf/runqslower/Makefile
+++ b/tools/bpf/runqslower/Makefile
@@ -19,7 +19,9 @@ CFLAGS := -g -Wall

 # Try to detect best kernel BTF source
 KERNEL_REL := $(shell uname -r)
-VMLINUX_BTF_PATHS := /sys/kernel/btf/vmlinux /boot/vmlinux-$(KERNEL_REL)
+VMLINUX_BTF_PATHS := $(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux) \
O= overrides KBUILD_OUTPUT=, so please handle it first. See
selftests/bpf/Makefile.
+       ../../../vmlinux /sys/kernel/btf/vmlinux \
+       /boot/vmlinux-$(KERNEL_REL)
 VMLINUX_BTF_PATH := $(or $(VMLINUX_BTF),$(firstword                           \
                                          $(wildcard $(VMLINUX_BTF_PATHS))))

--
2.24.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help