[aarch64-port-dev ] VAR_CPU_ARCH for ARM platforms

Bob Vandette bob.vandette at oracle.com
Wed Dec 23 14:55:35 UTC 2015


In my push to the mobile/dev forest, I changed VAR_CPU_ARCH on arm platforms to always use arm for both
32 and 64 bit arm builds to be consistent with the setting for x86/x86_64.

http://cr.openjdk.java.net/~bobv/8145936/webrev.00/ <http://cr.openjdk.java.net/~bobv/8145936/webrev.00/>

My assumption which is confirmed by most of the usage in the makefiles is that VAR_CPU_ARCH should be
set to the generic ARCH family (x86, arm) for both 32 and 64 bit builds.

My motivation for doing this was initially for the selection of the Socket and UnixConstant template files used
in cross compilation since these files contain the same content for arm and aarch64.

This seems to be causing at least one problem in the hotspot build where in JDK 9, ARCH is being set to
VAR_CPU_ARCH (via OPENJDK_TARGET_CPU_ARCH).  For aarch64 builds, ARCH gets set to arm.

In JDK8, ARCH is set to VAR_CPU and not VAR_CPU_ARCH.  Was there a reason for this change?
Can we go back to the way it was in JDK8????

There are a lot of hacks in both open and closed makefiles to set various variable based on ARCH in
order to end up with the correct variables.

In hotspot/make/defs.make, we undo the VAR_CPU_ARCH setting of x86 for x86_64 builds by
checking for LP64!    This is not done for arm.

 BUILDARCH ?= $(SRCARCH)
 ifeq ($(BUILDARCH), x86)
   ifdef LP64
     BUILDARCH = amd64
   else
     BUILDARCH = i486
   endif
 endif


in hotspot/make/closed/defs.make, we don't fix this issue either.

ifeq ($(ARCH), arm)
 SRCARCH = arm
 LIBARCH = arm

 ARCH_DATA_MODEL  = 32
 PLATFORM         = linux-arm
 VM_PLATFORM = linux_arm
 HS_ARCH          = arm
endif

ifeq ($(ARCH), aarch64)
 BUILDARCH = aarch64
 SRCARCH   = arm
 LIBARCH   = aarch64
 HS_ARCH   = arm
 SAARCH    = arm64
endif


More information about the aarch64-port-dev mailing list