bpf: runqslower: Prefer using local vmlimux to generate vmlinux.h
Update the Makefile to prefer using $(O)/vmlinux, $(KBUILD_OUTPUT)/vmlinux (for selftests) or ../../../vmlinux. These two files should have latest definitions for vmlinux.h. Signed-off-by: Song Liu <songliubraving@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210225234319.336131-6-songliubraving@fb.com
This commit is contained in:
parent
c540957a4d
commit
4b0d2d4156
|
@ -16,7 +16,10 @@ CFLAGS := -g -Wall
|
||||||
|
|
||||||
# Try to detect best kernel BTF source
|
# Try to detect best kernel BTF source
|
||||||
KERNEL_REL := $(shell uname -r)
|
KERNEL_REL := $(shell uname -r)
|
||||||
VMLINUX_BTF_PATHS := /sys/kernel/btf/vmlinux /boot/vmlinux-$(KERNEL_REL)
|
VMLINUX_BTF_PATHS := $(if $(O),$(O)/vmlinux) \
|
||||||
|
$(if $(KBUILD_OUTPUT),$(KBUILD_OUTPUT)/vmlinux) \
|
||||||
|
../../../vmlinux /sys/kernel/btf/vmlinux \
|
||||||
|
/boot/vmlinux-$(KERNEL_REL)
|
||||||
VMLINUX_BTF_PATH := $(or $(VMLINUX_BTF),$(firstword \
|
VMLINUX_BTF_PATH := $(or $(VMLINUX_BTF),$(firstword \
|
||||||
$(wildcard $(VMLINUX_BTF_PATHS))))
|
$(wildcard $(VMLINUX_BTF_PATHS))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue