[JDK-8277089](https://bugs.openjdk.java.net/browse/JDK-8277089) (PR #6378 ) 
introduced the feature to build hsdis with binutils which is provided by the 
system, however it may not work when it was build with --with-binutils=system.

We can see the following message when the problem happens. I saw it on Ubuntu 
20.04.


hsdis: bad native mach=architecture not set in Makefile!; please port hsdis to 
this platform


The cause is `-DLIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB` is not set in 
`HSDIS_CFLAGS`. For example, it will be set `LIBARCH_amd64` on AMD64. We should 
set `LIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB` to `HSDIS_CFLAGS` even if the 
builder uses system binutils.

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

Commit messages:
 - 8279644: hsdis may not work when it was built with --with-binutils=system

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

PR: https://git.openjdk.java.net/jdk/pull/6997

Reply via email to