Cross Compilation to Arm64 for OpenJDK, JogAmp on GNU/Linux, iOS, ..

Finally pushed our crosstool-ng-projects configuration to our SCM repositories and published the latest signed & hashed binaries here.

Changes to the last April toolchain builds are multiple:

  • Updating crosstool-ng to latest release 1.24.0
  • Aligning configuration with Debian 10 (Buster):
    • glibc 2.28
    • binutils 2.31.1
    • gcc 8.3.0 (unchanged)
  • Using 4-tuple symbolic links to 3-tuple, dropping vendor. This allows drop-in usage for OpenJDK cross-compilation via –with-toolchain-path=/usr/local/x-tools/aarch64-unknown-linux-gnu/bin

Then I have updated the user library developer sysroot package opt-linux-arm64-debian10, completing its coverage beyond JogAmp for full OpenJDK cross-compilation

  • Using automatic debian package fetching and extraction
  • Covering JogAmp cross-compilation
  • Coverage OpenJDK cross-compilation

Update (2019-11-30): Today’s snapshot has been signed and hashed. From here on the latest is available via this symbolic link. It includes the sysroot package of Debian 10 for aarch64 and armv6-armhf.

My full OpenJDK11 configure script for building its linux-aarch64 image on a linux-x86_64 now looks like the following quote

export CUPS_DIR=$HOME/projects/OpenJDK/cups-2.2.11/include
export JDK_DIR=/opt-linux-x86_64/jdk11

bash configure \
–with-toolchain-path=/usr/local/x-tools/aarch64-unknown-linux-gnu/bin \
–with-sysroot=/usr/local/x-tools/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot \
–with-alsa=/usr/local/x-tools/opt-linux-arm64-debian10/usr \
–with-x=/usr/local/x-tools/opt-linux-arm64-debian10/usr \
–with-fontconfig=/usr/local/x-tools/opt-linux-arm64-debian10/usr \
–with-freetype=bundled \
–with-extra-ldflags=”-Wl,-rpath-link=/usr/local/x-tools/opt-linux-arm64-debian10/usr/lib” \
–with-debug-level=release \
–enable-option-checking=fatal \
–openjdk-target=aarch64-linux-gnu \
–disable-warnings-as-errors \
–enable-headless-only \
–enable-aot=no \
–with-boot-jdk=$JDK_DIR \
–with-jdk-variant=normal \
–with-jvm-variants=server \
–with-cpu-port=aarch64 \
–with-abi-profile=aarch64 \
–with-conf-name=linux-aarch64-server-aarch64-release \
–with-cups-include=$CUPS_DIR \
–disable-precompiled-headers \
–disable-manpages \

In a followup blog I shall elaborate on the iOS Arm64 cross-compilation of OpenJDK, porting the OpenJDK9 to OpenJDK9-mobile differences to OpenJDK11.