Index: b/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c =================================================================== --- a/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c +++ b/jdk/src/java.base/unix/native/libnet/PlainDatagramSocketImpl.c @@ -41,7 +41,6 @@ #endif #ifdef __linux__ #include -#include #include #include Index: b/jdk/src/java.base/unix/native/libnet/PlainSocketImpl.c =================================================================== --- a/jdk/src/java.base/unix/native/libnet/PlainSocketImpl.c +++ b/jdk/src/java.base/unix/native/libnet/PlainSocketImpl.c @@ -43,7 +43,6 @@ #endif #ifdef __linux__ #include -#include #endif #include "jvm.h" Index: b/jdk/make/gensrc/GensrcX11Wrappers.gmk =================================================================== --- a/jdk/make/gensrc/GensrcX11Wrappers.gmk +++ b/jdk/make/gensrc/GensrcX11Wrappers.gmk @@ -91,9 +91,11 @@ ifneq ($(COMPILE_TYPE), cross) $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $* # use -m32/-m64 only if the compiler supports it + ifneq ($(OPENJDK_TARGET_CPU),x32) ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true) MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*" endif + endif SIZER_CFLAGS := \ -I$(JDK_TOPDIR)/src/java.base/share/native/include \ Index: b/hotspot/src/os/linux/vm/os_linux.cpp =================================================================== --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -1782,7 +1782,7 @@ void * os::dll_load(const char *filename #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; Index: b/common/autoconf/platform.m4 =================================================================== --- a/common/autoconf/platform.m4 +++ b/common/autoconf/platform.m4 @@ -35,6 +35,10 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU VAR_CPU_ARCH=x86 VAR_CPU_BITS=64 VAR_CPU_ENDIAN=little + case "$host" in *x32) + VAR_CPU=x32 + VAR_CPU_BITS=32 + esac ;; i?86) VAR_CPU=x86 @@ -496,6 +500,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HEL 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