>-----Original Message----- >From: Volker Simonis [mailto:volker.simo...@gmail.com] >Sent: Thursday, June 16, 2016 9:58 AM >To: Curtis Hamilton <hamil...@verizon.net> >Cc: ppc-aix-port-...@openjdk.java.net; Greg Lewis <gle...@eyesbeyond.com>; >bsd-port-dev@openjdk.java.net >Subject: Re: Adding BSD PPC Support to jdk9
>Hi Curtis, > >On Thu, Jun 16, 2016 at 2:55 PM, Curtis Hamilton <hamil...@verizon.net> wrote: >> >> >> -----Original Message----- >> From: Volker Simonis [mailto:volker.simo...@gmail.com] >> Sent: Thursday, June 16, 2016 4:34 AM >> To: Curtis Hamilton <hamil...@verizon.net> >> Cc: ppc-aix-port-...@openjdk.java.net >> Subject: Re: Adding BSD PPC Support to jdk9 >> >>>Hi Curtis, >>> >>>welcome on board! >> >> Volker, >> >> Thanks! >> >>>On Thu, Jun 16, 2016 at 4:48 AM, Curtis Hamilton <hamil...@verizon.net> >>>wrote: >>>> I want to contribute in the development of jdk9, by adding native >>>> ppc support for bsd. I've already developed core patches for native >>>> support in >>>> jdk9 and can successfully compile the mercurial. >>>> >>> >>>Congratulations! Sounds like an interesting project. >>>How big are the changes you had to do? Did you had to do significant changes >>>in the existing sources or did you merely add hotspot/src/os_cp/bsd_ppc ? >> >> First, let me correct myself, as I've been using the bsd-port jdk9 mercurial >> to build against. There are not real significant changes being made to the >> existing hotspot code. >>Mostly just adding hotspot/src/os_cpu/bsd_ppc. >> >> >>>> The extent of my testing, so far, is compiling "HelloWorld" and >>>> running simple command-line (text based) java applications. All >>>> seem to be working (no errors). However, I'm getting the following >>>> error(s) when attempting to test any app that uses a graphical interface: >>>> >>>> ...ppc64/libjava.so: Undefined symbol "jlog" >>>> >>> >-OR- >>>> >>>>...ppc64/libjava.so: Undefined symbol "jsin" >>>> >>> >>>In jdk/src/java.base/share/native/libfdlibm/jfdlibm.h the usual mathematical >>>functions are redefined to versions prefixed by 'j'. E.g. >>> >>>#define sin jsin >>> >>>jdk/src/java.base/share/native/libfdlibm/jfdlibm.h is included by >>>jdk/src/java.base/share/native/libfdlibm/fdlibm.h which is in tunr included >>>into jdk/src/java.base/share/native/libfdlibm/s_sin.c which defines the >>>function. >>> >>>Can you check if s_sin.c (and the other files from libfdlibm) get compiled >>>into libfdlibm.a. To do this, you can build with 'LOG=debug' >>>(i.e. make images LOG=debug). >>> >>>I suppose it is not build until you add a line like: >>> >>> LIBS_bsd := $(LIBDL) $(BUILD_LIBFDLIBM), \ >>> >>>to the >>> >>>$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \ >>> >>>section in jdk/make/lib/CoreLibraries.gmk >>> >>>Regards, >>>Volker >> >> You're spot on, as always. Although libfdlibm.a was being built, it was not >> being linked into libjava.so. When I looked at CoreLibraries.gmk and >> noticed that libfdlibm was >>missing from the "LIBS_unix" entry. >> >> So I changed it from: >> >> LIBS_unix := -ljvm -lverify, \ >> >> to: >> >> LIBS_unix := -ljvm -lverify $(LIBDL) $(BUILD_LIBFDLIBM), \ >> >> Now everything seems to be working. >> >Glad that it worked. Nevertheless I think changing LIBS_unix is not the right >way to fix your problem. LIBS_unix is used on all *nix systems (i.e. >concatenated with LIBS_solaris on >Solaris, etc) so your change will probably >break Solaris and AIX which don't need fdlibm or link it in a different way. S >you should really use LIBS_bsd for BSD specific settings. Also >you probably >don't need to include $(LIBDL) on BSD if it wasn't required until now. There are separate lines for Solaris and AIX, both already containing $(LIBDL) $(BUILD_LIBFDLIBM). I don't see how adding this to the *nix entry would break Solaris or AIX, but I yield to you expertise and will add a separate BSD line. >> Now that I've gotten core bsd ppc support working, how can I contribute this >> work into the overall project? >> > As you wrote that you are using the bsd-port jdk9 repository I've CCed > bsd-port-dev and Greg Lewis. > I'm not sure what's the state of the BSD-port project and if and when they > plan to integrate into the jdk9 mainline. For Java 9 it's definitely too late > as feature close has already >been reached a few weeks ago. >As your changes are based on the other changes in the bsd-port/jdk9 repository >it's probably the easiest to push them there (bsd-port/jdk9 seems to be merged >with jdk9/jdk9 >regularly and therefore should contain all the ppc stuff while >the main jdk9/jdk9 repos don't have the BSD stuff). Once you're in >bsd-port/jdk9 your changes will automatically go >into jdk9/jdk9 if the BSD >port will be merged into the jdk9 main line eventually. >Regarding the exact commit rules of the BSD-port project you have to ask >somebody from that project. No problem. I've already been in contact with Greg. I'll work with him on getting this support added to the bsd-port. Cheers, Curtis >Regards, >Volker > Regards, > Curtis > >>> I understand that jdk9 is WIP, but can someone point me in the right >>> direction to look? >>> >> >Thanks in advance! >>>