On Wed, 18 Oct 2023 09:31:22 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:

> hsdis-binutils.c doesn't use any functions from libiberty.h. This header is 
> absent on Ubuntu (installed separately, and under a different path), so 
> removing the include fixes the hsdis compilation on Ubuntu.
> 
> Additionally, the static link library for libiberty is not needed on Ubuntu; 
> I changed the autoconf check to make libiberty optional.
> 
> Verification (Ubuntu):
> - build with-binutils=system works
> - build with-binutils-src=binutils-2.30 continues to work
> - build with-binutils-src=binutils-2.38 continues to work
> 
> Source builds with versions newer than 2.38 fail, see #15138

make/autoconf/lib-hsdis.m4 line 239:

> 237:     AC_CHECK_LIB(bfd, bfd_openr, [ HSDIS_LIBS="-lbfd" ], [ 
> binutils_system_error="libbfd not found" ])
> 238:     AC_CHECK_LIB(opcodes, disassembler, [ HSDIS_LIBS="$HSDIS_LIBS 
> -lopcodes" ], [ binutils_system_error="libopcodes not found" ])
> 239:     # libiberty is not required on Ubuntu

Is libiberty required on anything?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16238#discussion_r1363590009

Reply via email to