Cross compile jdk8u on PPC32

Radu Andritoiu raduandritoiu at gmail.com
Wed Nov 1 17:27:12 UTC 2017


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/attachments/20171101/1a42f4dc/attachment.html>


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