RFR: 8295795: hsdis does not build with binutils 2.39+ [v3]

Magnus Ihse Bursie ihse at openjdk.org
Fri Sep 22 07:48:11 UTC 2023


On Fri, 22 Sep 2023 06:51:18 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> We never do 'make install' , so we are using the internal placement of files already.
>> Make install do not install some of the dependency we have (some h-files we use are not part of binutils installation, e.g. bfdver.h).
>> 
>> So we are stuck between hard place and a rock, we can't use the installed binutils file-tree, so we must keep using the internal build layout.
>
> It may be possible to read some elf header about binutils version.
> I.e. do make install from our build system, then reading out version from elf section and pass that into our build.
> As we need to know the signature of init_disassemble_info() which is different between binutils versions.

I'm still not really happy about this. The old solution without .libs has worked before -- has anything changed in newer versions of binutils? 

Also, we support building binutils in place as a convenience, but it should also be possible to just set a hsdis path, and in that case we cannot presume that the .libs layout is kept.

I suggest you change this to both eat the cake and have it -- first check for the lib in the original location (without .libs), and if it is not found there, check in .libs. This is perhaps not necessary here in LIB_BUILD_BINUTILS, but it definitely is in LIB_SETUP_HSDIS_BINUTILS. It will make the code a few lines longer but more robust.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15138#discussion_r1334012250


More information about the build-dev mailing list