Building hsdis?

Volker Simonis volker.simonis at
Wed Dec 27 11:26:33 UTC 2017

On Mon, Dec 25, 2017 at 11:58 PM, Andrew Haley <aph at> wrote:
> On 24/12/17 12:16, Volker Simonis wrote:
>> Andrew Haley <aph at> schrieb am So. 24. Dez. 2017 um 09:27:
>>> On 23/12/17 17:02, Volker Simonis wrote:
>>>> Andrew Haley <aph at> schrieb am Sa. 23. Dez. 2017 um 12:25:
>>> The GB can only solve problems which, in principle, can be solved.  I
>>> know of no reasonable way to solve this one.  There are some extreme
>>> solutions, such as re-licensing all of HotSpot, but that seems
>>> disproportionate.
>> There’a no need for any “extreme” solutions here. We’re speaking about 2
>> (in words “two”) files (i.e. src/utils/hsdis/hsdis.{c,h}) which are neither
>> part of the normal build nor part of any OpenJDK distribution. You have to
>> call the Makefile under src/utils/hsdis/ manually in order to build
>> But this links in a part of the GNU binutils (which has been
>> relicensed to GPLv3) into the generated shared library. So currently,
>> everybody who builds hsdis violates the GNU license because he combines
>> GPLv2 with GPLv3 code.
>> I simply don’t understand what’s so complicated in relicensing these two
>> hsdis.{c,h} files to GPLv3? Just to stress it one more time: they are NOT
>> part of the HotSpot or the JDK. They are just a tool which can be used to
>> anslyze some HotSpot internals.
> IANAL, but AFAIK It would not help.  The incompatibility is because
> you can't link pure GPLv2 code (HotSpot) and pure GPLv3 code
> (binutils) together, even via dynamic linkage.  Changing the licences
> of hsdis.{c,h}) won't solve that problem.

There are two different problems here:

1. It is not possible to build and redistribute because of
GPLv2 and GPLv3 license incompatibilities.

This problem could be easily solved by re-licensing hsdis.{c,h} under
GPLv3. That would allow it to others (e.g. the AdoptOpenJD project) to
provide pre-built version of for various platforms and
versions of OpenJDK. This will be definitely of great benefit for the
OpenJDK community, especially taking into account that many popular
tools like JITwatch or JMH use or depend on hsdis.

2. The second problem is wether and when a program and its plug-ins
are considered a single combined program.

This is a long standing problem [1] and without being a lawyer (which
is probably an advantage :) I'd consider the usage of hsdis a
"borderline case" (because HotSpot and hsdis dont't share any complex,
common data structures - they just pass a byte stream forth and back).
But that's just my opinion.

We can not easily solve or decide problem 2. But we can resolve the
first problem and give everybody the freedom to decide question 2 for
himself. Without resolving the first problem (i.e. re-licensing
hsdis.{c,h} under GPLv3) most people won't even face problem two (if
this is a problem at all) because they simply don't have a version of



> --
> Andrew Haley
> Java Platform Lead Engineer
> Red Hat UK Ltd. <>
> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the build-dev mailing list