]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bpf: properly account for libbfd variations
authorStanislav Fomichev <sdf@google.com>
Tue, 15 Jan 2019 22:03:27 +0000 (14:03 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 15 Jan 2019 23:53:48 +0000 (00:53 +0100)
commitfabd642cc16e24c5df214cf323509924db6b5f96
tree66bc63bf78c2fdca642245766f5ece7e0abb7b63
parente7e4e1163678481ab8a79cedb458d556f3f97ec1
tools/bpf: properly account for libbfd variations

On some platforms, in order to link against libbfd, we need to
link against liberty and even possibly libz. Account for that
in the bpftool Makefile. We now have proper feature detection
for each case, so handle each one separately.

See recent commit aaa2bc3661f3 ("perf build: Don't unconditionally link the
libbfd feature test to -liberty and -lz") where I fixed feature
detection.

v2 (addressed Jakub's nits):
  * better syntax for 'else ifeq'
  * no space between ifeq args
v3:
  * use LIBS, not EXTLIBS for -DHAVE_LIBBFD_SUPPORT

Fixes: 31c1adfd1332 ("bpftool: make libbfd optional")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/Makefile