RFR: JDK-8147795 Build system support for BSD

David Holmes david.holmes at oracle.com
Wed Jan 20 12:06:43 UTC 2016

On 20/01/2016 9:15 PM, Alan Bateman wrote:
> On 20/01/2016 10:54, Magnus Ihse Bursie wrote:
>> During my spare time last autumn, and in the holidays, I've been
>> playing around with the three major BSDs (FreeBSD, OpenBSD and
>> NetBSD), trying to learn something new. (Yeah, I know, this proves
>> that I have no life :-)).
>> And what better way to learn an operating system than to try and build
>> OpenJDK on it? :-) It quickly turned out that while there is a
>> bsd-port/jdk9 forest, it is empty (that is, it's identical to
>> jdk9/jdk9 with no BSD-specific patches in it). And building jdk8 is
>> sooo 2014. :)
>> So I started hacking around, focusing on improving issues in the build
>> system that prevented the build to succeed. I also needed to fix
>> issues in the source code (of course), but not as much as I'd
>> expected. My total solution builds and runs (I've tested "javac
>> HelloWorld.java") on the three BSDs, but some workarounds are needed,
>> mostly likely due to incomplete fixes in the source code.
>> The build changes turned out to also be an improvement for all
>> platforms in some areas, and I'd like to integrate it into the
>> mainline. While it is not enough in itself to build on BSD, it's a
>> (necessary) step on the way. I'll post a second review later on for my
>> source code changes, which still need some more cleanup to be
>> presentable.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8147795
>> WebRev:
>> http://cr.openjdk.java.net/~ihse/JDK-8147795-build-system-support-for-bsd/webrev.01
> Clearly some good work here but who is going to maintain this? For the
> AIX port then the SAP engineers maintain the port and keeping it
> working, it's not clear what will happen here. Also support for new
> ports feels like it should have a JEP.

My thoughts exactly. I was under the impression that what we had for OSX 
already worked on some of the BSD's as we have had some patches in the 
past from people building on that platform. But an attempt to produce 
complete support for the various BSD's needs to come with some level of 
support and commitment.


> Maybe I need to wait for the "source code webrev" but I could imagine
> some refactoring needed to avoid duplication with OS X specific code.
> Also when the Mac port was brought into OpenJDK then it came with a lot
> of #ifdef _ALLBSD_SOURCE patches and a lot of inconsistencies. General
> PITA when trying to move OS X specific patches forward and I know of
> several areas where the BSD specific code was just dropped.
> -Alan.

More information about the build-dev mailing list