Merging BSDPort into HotSpot mainline
kurt at intricatesoftware.com
Fri Aug 19 13:31:25 PDT 2011
On Friday 19 August 2011 12:58:50 pm Tom Rodriguez wrote:
> >>> +
> >>> +#if defined(__OpenBSD__)
> >>> + // Work-around OpenBSD's lack of $ORIGIN support by pre-loading libnet.so
> >>> + // ignore errors
> >>> + dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), "net");
> >>> + dll_load(buffer, ebuf, sizeof(ebuf));
> >>> +#endif
> >>> This one is due to OpenBSD's lack of $ORIGIN support in our runtime linker. I've been meaning to add support for it, but have been short on time. Clearly it is a hack but it is needed for OpenBSD until $ORIGIN is supported.
> >> Yes, this is the one I meant. Why is this hack in the JVM instead of the JDK? Aren't you likely to hit other problems than just this?
> > Indeed it is not a complete work-around. For example using JDWP requires setting LD_LIBRARY_PATH. I'm ok with this hunk not making it into hotspot. It will provide me the incentive to write $ORIGIN support for OpenBSD's runtime linker. :-)
> I would prefer that, though we could leave it in for now if that would be easier for you. Just so we have a plan for it's removal.
Either way is fine with me.
> >>>> I see a full copy of elf.h in there as well which I doubt we can accept. It seems to be apple specfic but doesn't mac use MachO?
> >>> This was brought in for Apple support. We need an Apple developer to remove it and find the places where the build is missing defines. I don't have an x86 OS/X box at the moment to do this work.
> >> I grabbed the patch and tried to build it on my mac. It immediately failed trying to build sa-jdi.jar since the standard Mac jdk doesn't have a separate tools.jar, which I guess is expected. The other problems I see are format mismatches in memprofiler.cpp and os.cpp that I think are fixed in the macosx-port repo with some more format changes. I assume that can be dealt with when those changes come in though.
> >> I made a patch that removes the usages of elf.h on Mac. I uploaded it as http://cr.openjdk.java.net/~never/elf. It compiles and builds on my Snow Leopard mac though I had to massage the build a little bit extra to deal with the previously mentioned format issues.
> > Great. Thank you.
> > What is the next step to move this forward?
> Sorry this is taking so long. I'll put together another webrev and test it that it builds and works as expected on our existing patforms and send it out early next week. I may go ahead and incorporate a few formatting things from the Mac OS X repo so those kinds of fixes can all be done at once.
> Official support for BSD/Mac OS X in the main repos is a bit further out but at least we can get everyone onto the pretty much the same repo. Since many of the JSR 292 users are on Mac this will make me much happier.
> Thanks for your patience.
Thank you for moving it forward.
More information about the hotspot-dev