tools/bpftool: fix bpftool build with bintutils >= 2.9
authorRoman Gushchin <guro@fb.com>
Wed, 27 Dec 2017 19:16:29 +0000 (19:16 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Sat, 30 Dec 2017 00:07:36 +0000 (01:07 +0100)
commitfb982666e380c1632a74495b68b3c33a66e76430
tree33a026c7772aa6845d6f992bd5a0a99b7fc842c6
parent4bfe3bd3cc351efd1d51b3258b060e9445533888
tools/bpftool: fix bpftool build with bintutils >= 2.9

Bpftool build is broken with binutils version 2.29 and later.
The cause is commit 003ca0fd2286 ("Refactor disassembler selection")
in the binutils repo, which changed the disassembler() function
signature.

Fix this by adding a new "feature" to the tools/build/features
infrastructure and make it responsible for decision which
disassembler() function signature to use.

Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/Makefile
tools/bpf/bpf_jit_disasm.c
tools/bpf/bpftool/Makefile
tools/bpf/bpftool/jit_disasm.c
tools/build/feature/Makefile
tools/build/feature/test-disassembler-four-args.c [new file with mode: 0644]