Hi Magnus, for what it is worth, I like your effort and think this is valuable. Looking through your changes, it looks like the current BSD support (non-apply) is broken in a number of places and I think if we keep it, we should fix it.
Disclaimer: I am neither a "R"eviewer nor a BSD expert. Because I am a typical programmer, I looked at your C/C++ changes rather than the makefile changes :) I understand they are not part of your review, and I was not sure if you wanted feedback, but nevertheless here are some notes/questions: --- http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patches/webrev.01/hotspot/src/os/bsd/vm/jsig.c.frames.html About jvmsig_t (also applies to os_bsd.cpp): I do not understand why we do not use standard POSIX sigset_t to represend signal sets. But I understand that this is not in the scope of your change. --- http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patches/webrev.01/hotspot/src/os/posix/vm/os_posix.cpp.frames.html print_rlimit_info(): would it make not more sense to just print both "AS" and "DATA" on all platforms? --- http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patches/webrev.01/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c.frames.html I am confused about the "waitid on Mac OS X 10.7 seems to be broken;"; if this is still an issue, would it not make sense to use your alternate path (using waitpid() instead) for MacOS too? --- http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patches/webrev.01/jdk/src/java.base/unix/native/libnet/portconfig.c.frames.html Should your approach (using sysctl() instead of sysctlbyname) not work on all BSD variants? Could the __OpenBSD__ and the _ALLBSD_SOURCE_ branch folded into one? Kind Regards, Thomas On Wed, Jan 20, 2016 at 12:02 PM, Magnus Ihse Bursie < magnus.ihse.bur...@oracle.com> wrote: > On 2016-01-20 11: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. >> > > However, if anyone is curious, here is my current patchset. Note that this > is *not* part of the review for JDK-8147795 . > > > http://cr.openjdk.java.net/~ihse/JDK-8147795_addendum-bsd-source-patches/webrev.01/ > > /Magnus > > > >> 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 >> >> /Magnus >> > > >