Re: [PATCH v3 0/8] tools: fix compilation failure caused by init_disassemble_info API changes

From: Daniel Borkmann
Date: Mon Aug 08 2022 - 09:35:50 EST


On 8/1/22 8:02 PM, Arnaldo Carvalho de Melo wrote:
Em Mon, Aug 01, 2022 at 04:15:19PM +0100, Quentin Monnet escreveu:
On 01/08/2022 13:45, Arnaldo Carvalho de Melo wrote:
Em Sun, Jul 31, 2022 at 06:38:26PM -0700, Andres Freund escreveu:
binutils changed the signature of init_disassemble_info(), which now causes
compilation failures for tools/{perf,bpf} on e.g. debian unstable. Relevant
binutils commit:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07

I first fixed this without introducing the compat header, as suggested by
Quentin, but I thought the amount of repeated boilerplate was a bit too
much. So instead I introduced a compat header to wrap the API changes. Even
tools/bpf/bpftool/jit_disasm.c, which needs its own callbacks for json, imo
looks nicer this way.

I'm not regular contributor, so it very well might be my procedures are a
bit off...

I am not sure I added the right [number of] people to CC?

I think its ok
WRT the feature test: Not sure what the point of the -DPACKAGE='"perf"' is,

I think its related to libbfd, and it comes from a long time ago, trying
to find the cset adding that...

nor why tools/perf/Makefile.config sets some LDFLAGS/CFLAGS that are also
in feature/Makefile and why -ldl isn't needed in the other places. But...

V2:
- split patches further, so that tools/bpf and tools/perf part are entirely
separate

Cool, thanks, I'll process the first 4 patches, then at some point the
bpftool bits can be merged, alternatively I can process those as well if
the bpftool maintainers are ok with it.

I'll just wait a bit to see if Jiri and others have something to say.

- Arnaldo

Thanks for this work! For the series:

Acked-by: Quentin Monnet <quentin@xxxxxxxxxxxxx>

For what it's worth, it would make sense to me that these patches remain
together (so, through Arnaldo's tree), given that both the perf and
bpftool parts depend on dis-asm-compat.h being available.

Ok, so I'm tentatively adding it to my local tree to do some tests, if
someone disagrees, please holler.

Ack, sgtm. Please route these fixes via your tree. Thanks Arnaldo!