Adding BSD PPC Support to jdk9

Curtis Hamilton hamiltcl at verizon.net
Thu Jun 16 12:55:18 UTC 2016



-----Original Message-----
From: Volker Simonis [mailto:volker.simonis at gmail.com] 
Sent: Thursday, June 16, 2016 4:34 AM
To: Curtis Hamilton <hamiltcl at verizon.net>
Cc: ppc-aix-port-dev at 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 <hamiltcl at 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.  

Now that I've gotten core bsd ppc support working, how can I contribute this work into the overall project?

Regards,
Curtis

>> I understand that jdk9 is WIP, but can someone point me in the right 
>> direction to look?
>>
> >Thanks in advance!
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-jdk_make_lib_CoreLibraries.gmk
Type: application/octet-stream
Size: 549 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20160616/54158988/patch-jdk_make_lib_CoreLibraries.gmk>


More information about the ppc-aix-port-dev mailing list