Cross compile jdk8u on PPC32
Radu Andritoiu
raduandritoiu at gmail.com
Fri Nov 10 12:39:59 UTC 2017
Hello,
This really fixed it for me.
I guess when cross-compiling it should not use specific ASM instructions.
For the second diff patch, I used the one I attached here. Basically it is
the same.
Thank you,
Radu
On Thu, Nov 2, 2017 at 2:11 AM, Tiago Daitx <tiago.daitx at canonical.com>
wrote:
> Radu,
>
> Please check if this patch from Debian/Ubuntu fix your issue:
> http://bazaar.launchpad.net/~openjdk/openjdk/openjdk8/view/
> head:/debian/patches/hotspot-powerpcspe.diff
>
> You might also need this one:
> http://bazaar.launchpad.net/~openjdk/openjdk/openjdk8/view/
> head:/debian/patches/zero-missing-headers.diff
>
> I know that zero is buildable in PPC32 since we did it for Ubuntu and
> do it for Debian, but I'm not sure this is all you need.
>
> Regards,
> Tiago
>
>
> On Wed, Nov 1, 2017 at 3:27 PM, Radu Andritoiu <raduandritoiu at gmail.com>
> wrote:
> > Hello,
> >
> > I still have one error that I can not fix in order to compile the "zero"
> > jvm-variant for PPC32:
> > - the error:
> >
> > Compiling /home/build/jdk8u/hotspot/src/share/vm/runtime/atomic.cpp
> > /home/build/jdk8u/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp: In
> > static member function 'static jlong Atomic::add(jlong, volatile
> jlong*)':
> > /home/build/jdk8u/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp:44:
> > error: impossible constraint in 'asm'
> > /home/build/jdk8u/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp:44:
> > error: impossible constraint in 'asm'
> > gmake[6]: *** [atomic.o] Error 1
> >
> > - the code from the file
> > /home/build/jdk8u/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
> where
> > I get the error is:
> >
> > // Atomically copy 64 bits of data
> > static void atomic_copy64(volatile void *src, volatile void *dst) {
> > #if defined(PPC32)
> > double tmp;
> > asm volatile ("lfd %0, 0(%1)\n"
> > "stfd %0, 0(%2)\n"
> > : "=f"(tmp)
> > : "b"(src), "b"(dst));
> > #elif defined(S390) && !defined(_LP64)
> > double tmp;
> > asm volatile ("ld %0, 0(%1)\n"
> > "std %0, 0(%2)\n"
> > : "=r"(tmp)
> > : "a"(src), "a"(dst));
> > #else
> > *(jlong *) dst = *(jlong *) src;
> > #endif
> > }
> >
> > - line 44 is this one:
> >
> > : "b"(src), "b"(dst));
> >
> >
> >
> > Thank you,
> > Radu
> >
> >
> >
> > On Tue, Oct 24, 2017 at 3:34 PM, Bob Vandette <bob.vandette at oracle.com>
> > wrote:
> >
> >> As others have mentioned, you need to target ZERO and not PPC32 when
> >> trying to build
> >> a non supported cpu architecture with the Zero interpreter.
> >>
> >> You do need to have a libffi.so binary available for the build. Zero
> uses
> >> this to manage the
> >> native stack frames.
> >>
> >> Bob.
> >>
> >>
> >> > On Oct 24, 2017, at 4:46 AM, Andrew Haley <aph at redhat.com> wrote:
> >> >
> >> > On 18/10/17 13:20, Radu Andritoiu wrote:
> >> >> I am trying to compile jdk8u using jvm-variant "zero" and it asks for
> >> >> 'libffi'.
> >> >> I read that it uses 'libffi' for JNA to bridge between the
> interpreter
> >> and
> >> >> native code. It does not use JNI.
> >> >
> >> > That's wrong. Zero supports JNI just fine.
> >> >
> >> > --
> >> > Andrew Haley
> >> > Java Platform Lead Engineer
> >> > Red Hat UK Ltd. <https://www.redhat.com>
> >> > EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
> >>
> >>
> >
> > On Tue, Oct 24, 2017 at 3:34 PM, Bob Vandette <bob.vandette at oracle.com>
> > wrote:
> >
> >> As others have mentioned, you need to target ZERO and not PPC32 when
> >> trying to build
> >> a non supported cpu architecture with the Zero interpreter.
> >>
> >> You do need to have a libffi.so binary available for the build. Zero
> uses
> >> this to manage the
> >> native stack frames.
> >>
> >> Bob.
> >>
> >>
> >> > On Oct 24, 2017, at 4:46 AM, Andrew Haley <aph at redhat.com> wrote:
> >> >
> >> > On 18/10/17 13:20, Radu Andritoiu wrote:
> >> >> I am trying to compile jdk8u using jvm-variant "zero" and it asks for
> >> >> 'libffi'.
> >> >> I read that it uses 'libffi' for JNA to bridge between the
> interpreter
> >> and
> >> >> native code. It does not use JNI.
> >> >
> >> > That's wrong. Zero supports JNI just fine.
> >> >
> >> > --
> >> > Andrew Haley
> >> > Java Platform Lead Engineer
> >> > Red Hat UK Ltd. <https://www.redhat.com>
> >> > EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
> >>
> >>
>
>
>
> --
> Tiago Stürmer Daitx
> Software Engineer
> tiago.daitx at canonical.com
>
> PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com)
> Fingerprint = 45D0 FE5A 8109 1E91 866E 8CA4 1931 8D5E F5B2 13BE
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20171110/e79ff135/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jdk8u_hotspot.patch
Type: application/octet-stream
Size: 1176 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20171110/e79ff135/jdk8u_hotspot.patch>
More information about the ppc-aix-port-dev
mailing list