[aarch64-port-dev ] VAR_CPU_ARCH for ARM platforms
Bob Vandette
bob.vandette at oracle.com
Wed Dec 23 20:36:35 UTC 2015
> On Dec 23, 2015, at 11:55 AM, Andrew Haley <aph at redhat.com> wrote:
>
> On 23/12/15 14:55, Bob Vandette wrote:
>
>> 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.
>
> This isn't a similar situation, IMO.
There appears to be a need for a variable that is used to indicate an x86
or ARM specific path independent of the specific type of ARM or x86 processor.
Why don’t you this this is a similar situation. x86_64 is a 64-bit
Intel architecture that also has the ability to run it’s legacy 32 bit binaries.
aarch64 is a 64-bit ARM architecture that also has the ability to run its legacy
armv7 (aarch32) 32-bit binaries.
aarch32 may be slightly different in that it has the ability to use some newer armv8
instructions but it is compatible with armv7 with very few exceptions like the old mcr instructions.
>
>> 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.
>
> I'm not convinced this makes any sense. The only thing the ARM
> architectures have in common is that they come from the same company.
> This is not true of x86_64, which is a rather elaborate 64-bit
> extension of x86.
One could say the same thing about armv8 versus armv7.
> For examples of how the ARM/AArch64 split is
> handled elsewhere, note that the Linux kernel, GCC, and GNU binutils
> arches are all separate.
>
>> 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.
>
> It really should not need to be. AArch64 is not ARM.
That really depends on your criteria for comparison. I still believe we need a broad
variable that identifies ARM varieties. Without this, when the aarch32 port is attempted
there’s going to be a lot of extraneous checks required in the makefile for “if ARCH == aarch32” || ARCH == arm in
places that would not need to be changed simply because we didn’t use the existing variable
for the purpose that I believe it was originally intended.
Bob.
>
> Andrew.
More information about the aarch64-port-dev
mailing list