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

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

Commit messages:
 - Make libiberty optional

Changes: https://git.openjdk.org/jdk/pull/16238/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16238&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8318418
  Stats: 5 lines in 2 files changed: 1 ins; 1 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/16238.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16238/head:pull/16238

PR: https://git.openjdk.org/jdk/pull/16238

Reply via email to