PPC-AIX Port to FreeBSD PowerPC Support
Volker Simonis
volker.simonis at gmail.com
Tue Jan 12 07:30:22 UTC 2016
HI Chris,
if you start with jdk8u-dev
(http://hg.openjdk.java.net/jdk8u/jdk8u-dev/) it will contain both,
the bsd and the ppc64 port. So all you have to do is to create a new
hotspot/src/os_cpu/bsd_ppc64 directory and populating it with the
appropriate files. As boilerplate you can combine the versions from
linux_ppc and bsd_x86. For orderAccess you'd probaly stick to
orderAccess_linux_ppc.inline.hpp because that one is more and CPU than
OS specific and the linux version already contains GCC specific code
which should easily work on bsd as well. For other files like os_...
it may be easier to start with the os_bsd_x86 version and port the CPU
specific parts by looking at the corresponding implementation in
os_linux_ppc.
Regards,
Volker
On Mon, Jan 11, 2016 at 9:28 PM, Curtis Hamilton <hamiltcl at verizon.net> wrote:
> Thomas,
>
>
>
> Thanks for the vector check!
>
>
>
> I agree that the AIX os is quite different from other unices (I have an old
> PowerStation 220 in my collection). However, the ppc-aix-port was the first
> that contained code specific to the ppc. Since there isn’t a ppc-bsd port,
> I needed somewhere to start. PPC code for both AIX and Linux can be found
> in the same port. The ports available on FreeBSD currently do contain any
> of the ppc headers or code. So I decided to use a port that already had the
> ppc code and go from there.
>
>
>
> Now that ppc code is being integrated into a more universal port, I just
> need to check which jdk8 port to work with.
>
>
>
> Any recommendation?
>
>
>
> Regards,
>
> Curtis
>
>
>
> From: Thomas Stüfe [mailto:thomas.stuefe at gmail.com]
> Sent: Monday, January 11, 2016 11:23 AM
> To: Curtis Hamilton <hamiltcl at verizon.net>
> Cc: Volker Simonis <volker.simonis at gmail.com>;
> ppc-aix-port-dev at openjdk.java.net
>
>
> Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support
>
>
>
> Hi Curtis,
>
>
>
> I am not sure that AIX ppc would be the best source for an BSD port. AIX os
> port contains a large number of AIX specifics and it is quite a bit
> different (sometimes, needlessly) from the other Unices. It is also a moving
> target, at least on jdk9, as we changed a lot in the AIX os port and will
> change more until the next feature close.
>
>
>
> So, it may be that linux ppc would be a better porting source for a bsd ppc
> port.
>
>
>
> Kind Regards, Thomas
>
>
>
>
>
>
>
>
>
>
>
> On Mon, Jan 11, 2016 at 3:21 PM, Curtis Hamilton <hamiltcl at verizon.net>
> wrote:
>
> Volker,
>
>
>
> Thanks for the response.
>
>
>
> Yes, I’m using the mercurial jdk7u ppc-aix version. The reason I used this
> port version was because I was more familiar with the build layout of jdk7
> versus jdk8/jdk9. And it seemed like an easier target to start with, since
> it already supported ppc64 on AIX and Linux.
>
>
>
> Full disclosure, I’ve been successful in building zero vm for both jdk7 and
> jdk8 on ppc64/FreeBSD. They both work great. The system performance is
> somewhat sluggish, but usable. So I decided to see if I could build native
> ppc64 versions leveraging the existing AIX and Linux ppc64 support in the
> ppc-aix-port, since the bsd-port lacks support for PowerPC.
>
>
>
> I’m aware of the integration effort for jdk9. So on your advice, I will
> start working with ppc-aix jdk8u. I don’t want anyone to waste time with
> jdk7u. Although my efforts with this older version is not completely wasted.
>
>
>
> I look forward to contributing to the ppc64/bsd port OpenJDK integration
> effort.
>
>
>
> Regards,
>
> Curtis
>
>
>
> From: Volker Simonis [mailto:volker.simonis at gmail.com]
> Sent: Monday, January 11, 2016 5:22 AM
> To: Curtis Hamilton <hamiltcl at verizon.net>
> Cc: ppc-aix-port-dev at openjdk.java.net
> Subject: Re: PPC-AIX Port to FreeBSD PowerPC Support
>
>
>
> Hi Curtis,
>
> no, I'm not aware of any effort to port the ppc64 port to BSD.
>
> My first question is why are you building jdk7. It is quite old and we don't
> actually support it any more. It was also never integrated into the main
> jdk7u branch. I'd strongly recommend to use at least the jdk8u version. If
> you plan to contribute the ppc64/bsd port for integration into the OpenJDK,
> this has to be done into the head revision (currently jdk9) anyway. Once
> it's there, it may be possible to downport it to jdk8u (but not to jdk7u
> because that on doesn't even contain the ppc64 port).
>
> That said, which version of jdk7u are you using? Is it the one from
> http://hg.openjdk.java.net/ppc-aix-port/jdk7u/ ?
>
> One problem you may encounter with jdk7u is that it was never compiled with
> new versions of gcc. I see you are using gcc4.8 but we used 4.1.2 back then
> when we were doing the port.
>
> Another problem is that we didn't support the serviceability agent in jdk7u.
> Support for the SA agent on Linux/ppc64 (but not for AIX) was added in jdk8.
> The error you see in vmStructs.cpp is most probably from SA coding. How does
> your file vmStructs_bsd_ppc.hpp looks like. As you can see,
> vmStructs_linux_ppc.hpp is empty in jdk7u for the ppc64 port while it has
> some code in jdk8u-dev and jdk9.
>
> Unfortunately the place in vmStructs.cpp where the error happens is deeply
> nested macro coding so it's hard to say what's wrong from the error message.
> You could preprocess the file and post that to the list, maybe we can see
> more. Just issue the following command from a shell from within
> /usr/ports/tmp/jdk7u/build/bsd-ppc/hotspot/outputdir/bsd_ppc64_compiler2/product:
>
> g++48 -DBSD -DPPC64 -D_ALLBSD_SOURCE -D_GNU_SOURCE -DPRODUCT
> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/prims
> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm
> -I/usr/ports/tmp/jdk7u/hotspot/src/share/vm/precompiled
> -I/usr/ports/tmp/jdk7u/hotspot/src/cpu/ppc/vm
> -I/usr/ports/tmp/jdk7u/hotspot/src/os_cpu/bsd_ppc/vm
> -I/usr/ports/tmp/jdk7u/hotspot/src/os/bsd/vm
> -I/usr/ports/tmp/jdk7u/hotspot/src/os/posix/vm -I../generated
> -DHOTSPOT_RELEASE_VERSION="\"24.80-b11\""
> -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\""
> -DHOTSPOT_LIB_ARCH=\"ppc\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\""
> -DDEFAULT_LIBPATH="\"/lib:/usr/lib:/usr/local/lib\"" -DTARGET_OS_FAMILY_bsd
> -DTARGET_ARCH_ppc -DTARGET_ARCH_MODEL_ppc_64 -DTARGET_OS_ARCH_bsd_ppc
> -DTARGET_OS_ARCH_MODEL_bsd_ppc_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -fPIC
> -fno-rtti -fno-exceptions -pthread -fcheck-new -mpowerpc64 -pipe
> -DDONT_USE_PRECOMPILED_HEADER -O3 -fno-strict-aliasing -D_LP64=1 -m64
> -mminimal-toc -mcpu=powerpc64 -mtune=power5
> -minsert-sched-nops=regroup_exact -mno-multiple -mno-string
> -DSAFEFETCH_STUBS -DINCLUDE_TRACE=1 -Werror -Wpointer-arith -Wconversion
> -Wsign-compare -E
> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp
>
> Regards,
>
> Volker
>
>
>
> On Sun, Jan 10, 2016 at 3:04 PM, Curtis Hamilton <hamiltcl at verizon.net>
> wrote:
>
> Hello,
>
> I’d like to know if there’s been any work done to support PPC for *BSD?
>
> I’ve hacked both the AIX and Linux PPC headers but have been unsuccessful in
> building HotSpot. All modules seem to build with the exception of
> VMStructs.cpp with the below error.
>
> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp: In static
> member function 'static void VMStructs::init()':
> /usr/ports/tmp/jdk7u/hotspot/src/share/vm/runtime/vmStructs.cpp:3015: error:
> cannot convert 'pthread**' to 'pid_t*' in initialization
>
> Build log is attached.
>
> Thanks in advance!
>
>
>
> Curtis
>
>
>
>
>
>
More information about the ppc-aix-port-dev
mailing list