[PATCH 0/3] perf/bpftool: Allow to link libbpf dynamically

Jiri Olsa
2019-11-27T09:48:55Z

hi,
adding support to link bpftool with libbpf dynamically,
and config change for perf.

It's now possible to use:
$ make -C tools/bpf/bpftool/ LIBBPF_DYNAMIC=1

which will detect libbpf devel package with needed version,
and if found, link it with bpftool.

It's possible to use arbitrary installed libbpf:
$ make -C tools/bpf/bpftool/ LIBBPF_DYNAMIC=1 LIBBPF_DIR=/tmp/libbpf/

I based this change on top of Arnaldo's perf/core, because
it contains libbpf feature detection code as dependency.
It's now also synced with latest bpf-next, so Toke's change
applies correctly.

Also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
libbpf/dyn

thanks,
jirka

---
Jiri Olsa (2):
perf tools: Allow to specify libbpf install directory
bpftool: Allow to link libbpf dynamically

Toke Høiland-Jørgensen (1):
libbpf: Export netlink functions used by bpftool

tools/bpf/bpftool/Makefile | 40 +++++++++++++++++++++++++++++++++++++++-
tools/build/feature/test-libbpf.c | 9 +++++++++
tools/lib/bpf/libbpf.h | 22 +++++++++++++---------
tools/lib/bpf/libbpf.map | 7 +++++++
tools/lib/bpf/nlattr.h | 15 ++++++++++-----
tools/perf/Makefile.config | 27 ++++++++++++++++++++-------
6 files changed, 98 insertions(+), 22 deletions(-)