Cross compiling openjdk9, problem with HotSpot assembly code

Bruno Kremel bruno.kremel at gmail.com
Wed Mar 29 19:42:48 UTC 2017


Hi All,

I am trying to compile Openjdk 9 (HG tag changeset 162) and I do
following:
./configure --with-jvm-interpreter=cpp --with-jvm-variants=zero \
--enable-openjdk-only \
--with-freetype-include=~/linux/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include/freetype2\
--with-freetype-lib=~/linux/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib \
--with-freetype=~/linux/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/\
--with-debug-level=release \
--openjdk-target=arm-buildroot-linux-gnueabi \
--with-sys-root=~/linux/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot\
--with-tools-dir=~/linux/buildroot/output/host
--disable-freetype-bundling\
--enable-unlimited-crypto\
--enable-headless-only\
--disable-warnings-as-errors\
OBJCOPY=~/linux/buildroot/output/host/usr/bin/arm-linux-gnueabi-objcopy\
STRIP=~/linux/buildroot/output/host/usr/bin/arm-linux-gnueabi-strip\
CPP_FLAGS=-lstdc++ CXX_FLAGS=-lstdc++\
CPP=~/linux/buildroot/output/host/usr/bin/arm-linux-gnueabi-cpp\
CXX=~/linux/buildroot/output/host/usr/bin/arm-linux-gnueabi-g++\
CC=~/linux/buildroot/output/host/usr/bin/arm-linux-gnueabi-gcc\
LD=~/linux/buildroot/output/host/usr/bin/arm-linux-gnueabi-gcc

After the successful configure I get following summary:
Configuration summary:
* Debug level:    release
* HS debug level: product
* JDK variant:    normal
* JVM variants:   zero
* OpenJDK target: OS: linux, CPU architecture: arm, address length: 32
* Version string: 9-internal+0-adhoc.bruno.openjdk-jdk-9162 (9-internal)

Tools summary:
* Boot JDK:       openjdk version "1.8.0_121" OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13) OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)  (at /usr/lib/jvm/java-8-openjdk-amd64)
* Toolchain:      gcc (GNU Compiler Collection)
* C Compiler:     Version 5.2.1 (at /home/bruno/linux/buildroot/output/host/usr/bin/arm-linux-gnueabi-gcc)
* C++ Compiler:   Version 5.2.1 (at /home/bruno/linux/buildroot/output/host/usr/bin/arm-linux-gnueabi-g++)

Build performance summary:
* Cores to use:   8
* Memory limit:   15773 MB

All seems fine...

But the make fails on some hotspot assembly code:
/home/bruno/linux/buildroot/output/build/openjdk-jdk-9+162/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp:1530:8: error: 'void MacroAssembler::movptr(Address, int32_t)' cannot be overloaded
   void movptr(Address dst, int32_t imm32);
        ^
/home/bruno/linux/buildroot/output/build/openjdk-jdk-9+162/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp:1513:8: error: with 'void MacroAssembler::movptr(Address, intptr_t)'
   void movptr(Address dst, intptr_t src);
        ^
/home/bruno/linux/buildroot/output/build/openjdk-jdk-9+162/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp:1531:8: error: 'void MacroAssembler::movptr(Register, int32_t)' cannot be overloaded
   void movptr(Register dst, int32_t imm32);
        ^
/home/bruno/linux/buildroot/output/build/openjdk-jdk-9+162/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp:1511:8: error: with 'void MacroAssembler::movptr(Register, intptr_t)'
   void movptr(Register dst, intptr_t src);

It seems that it tries to compile some x86_64 assembly code which does
not make sense when clearly configure states that I have the ARM target.

The other thing I don't understand why does it even compile hotspot
code? I have asked for zero interpreter AND openjdk only, I actually
don't want to use HotSpot I intend to use JamVM with OpenJDK classpath.

Do you have any suggestions.

Thanks
Bruno Kremel



More information about the zero-dev mailing list