# HG changeset patch # User glaubitz # Date 1536065181 -7200 # Tue Sep 04 14:46:21 2018 +0200 # Node ID 453698f292b4b666d71d92fde943cb01988a7372 # Parent 507c7258084258f8b1264fff1e1943ecab2d4797 8165440: Add zero support for x86_64-linux-gnux32 target diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4 --- a/make/autoconf/flags.m4 +++ b/make/autoconf/flags.m4 @@ -241,7 +241,8 @@ elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" elif test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then - if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 || + if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 && + test "x$OPENJDK_TARGET_CPU" != xx32 || test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc || test "x$OPENJDK_TARGET_CPU_ARCH" = xppc; then MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}" diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4 --- a/make/autoconf/platform.m4 +++ b/make/autoconf/platform.m4 @@ -30,6 +30,12 @@ [ # First argument is the cpu name from the trip/quad case "$1" in + x86_64*x32) + VAR_CPU=x32 + VAR_CPU_ARCH=x86 + VAR_CPU_BITS=32 + VAR_CPU_ENDIAN=little + ;; x86_64) VAR_CPU=x86_64 VAR_CPU_ARCH=x86 @@ -455,6 +461,8 @@ HOTSPOT_$1_CPU_DEFINE=IA32 elif test "x$OPENJDK_$1_CPU" = xx86_64; then HOTSPOT_$1_CPU_DEFINE=AMD64 + elif test "x$OPENJDK_$1_CPU" = xx32; then + HOTSPOT_$1_CPU_DEFINE=X32 elif test "x$OPENJDK_$1_CPU" = xsparcv9; then HOTSPOT_$1_CPU_DEFINE=SPARC elif test "x$OPENJDK_$1_CPU" = xaarch64; then diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp @@ -1742,7 +1742,7 @@ #if (defined IA32) static Elf32_Half running_arch_code=EM_386; -#elif (defined AMD64) +#elif (defined AMD64) || (defined X32) static Elf32_Half running_arch_code=EM_X86_64; #elif (defined IA64) static Elf32_Half running_arch_code=EM_IA_64;