mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-07 15:15:29 +00:00
bpf: Check CONFIG_BPF option for resolve_btfids
Currently all the resolve_btfids 'users' are under CONFIG_BPF code, so if we have CONFIG_BPF disabled, resolve_btfids will fail, because there's no data to resolve. Disabling resolve_btfids if there's CONFIG_BPF disabled, so we won't fail such builds. Suggested-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200923185735.3048198-1-jolsa@kernel.org
This commit is contained in:
parent
0789e13bc3
commit
017dab341e
2 changed files with 6 additions and 4 deletions
4
Makefile
4
Makefile
|
@ -1084,13 +1084,15 @@ ifdef CONFIG_STACK_VALIDATION
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef CONFIG_BPF
|
||||||
ifdef CONFIG_DEBUG_INFO_BTF
|
ifdef CONFIG_DEBUG_INFO_BTF
|
||||||
ifeq ($(has_libelf),1)
|
ifeq ($(has_libelf),1)
|
||||||
resolve_btfids_target := tools/bpf/resolve_btfids FORCE
|
resolve_btfids_target := tools/bpf/resolve_btfids FORCE
|
||||||
else
|
else
|
||||||
ERROR_RESOLVE_BTFIDS := 1
|
ERROR_RESOLVE_BTFIDS := 1
|
||||||
endif
|
endif
|
||||||
endif
|
endif # CONFIG_DEBUG_INFO_BTF
|
||||||
|
endif # CONFIG_BPF
|
||||||
|
|
||||||
PHONY += prepare0
|
PHONY += prepare0
|
||||||
|
|
||||||
|
|
|
@ -341,9 +341,9 @@ fi
|
||||||
vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}
|
vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}
|
||||||
|
|
||||||
# fill in BTF IDs
|
# fill in BTF IDs
|
||||||
if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
|
if [ -n "${CONFIG_DEBUG_INFO_BTF}" -a -n "${CONFIG_BPF}" ]; then
|
||||||
info BTFIDS vmlinux
|
info BTFIDS vmlinux
|
||||||
${RESOLVE_BTFIDS} vmlinux
|
${RESOLVE_BTFIDS} vmlinux
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then
|
if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue