On 03/07/2022 22:25, Andres Freund wrote: > binutils changed the signature of init_disassemble_info(), which now causes > compilation failures for tools/{perf,bpf}, e.g. on debian unstable. > Relevant binutils commit: > https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 > > This commit introduces a wrapper for init_disassemble_info(), to avoid > spreading #ifdef DISASM_INIT_STYLED to a bunch of places. Subsequent > commits will use it to fix the build failures. > > It likely is worth adding a wrapper for disassember(), to avoid the already > existing DISASM_FOUR_ARGS_SIGNATURE ifdefery. > > Cc: Alexei Starovoitov <ast@xxxxxxxxxx> > Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> > Cc: Sedat Dilek <sedat.dilek@xxxxxxxxx> > Cc: Quentin Monnet <quentin@xxxxxxxxxxxxx> > Link: http://lore.kernel.org/lkml/20220622181918.ykrs5rsnmx3og4sv@xxxxxxxxxxxxxxxxx > Signed-off-by: Andres Freund <andres@xxxxxxxxxxx> > --- > tools/include/tools/dis-asm-compat.h | 53 ++++++++++++++++++++++++++++ > 1 file changed, 53 insertions(+) > create mode 100644 tools/include/tools/dis-asm-compat.h > > diff --git a/tools/include/tools/dis-asm-compat.h b/tools/include/tools/dis-asm-compat.h > new file mode 100644 > index 000000000000..d1d003ee3e2f > --- /dev/null > +++ b/tools/include/tools/dis-asm-compat.h > @@ -0,0 +1,53 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ Any chance you could contribute this wrapper as dual-licenced (GPL-2.0-only OR BSD-2-Clause), for better compatibility with the rest of bpftool's code? The rest of the set looks good to me. Thanks a lot for this work! Quentin