summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os/AndroidVersion.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-01-30 07:04:39 +0100
committerSven Gothel <[email protected]>2015-01-30 07:04:39 +0100
commit30933c60156c67a9624fefae2be6504300ce71bb (patch)
treed69de1e3568cb72655680124ac8f36ca614d05e5 /src/java/com/jogamp/common/os/AndroidVersion.java
parentb6e3878d253abab0dc864279eb1ae01fff220acf (diff)
Bug 1122: Add AArch64 support (Android, GNU/Linux and in general)
- Add AArch64 detection via - Elf Parser - Android properties - Java properties - Android: Validate CPUType.Family _and_ ABIType - MachineDescription - Remove redundant Type ID and its field - Reuse X86_64_UNIX for AArch64 (static config) New ARCH 'aarch64' for ant: <os arch> armv8a aarch64 New CPUType.ARM64 (ARM): java: os.arch aarch64 arm64 New CPUType.ARMv8_A (ARM): java: os.arch armv8-a arm64-v8a New ABIType: EABI_AARCH64
Diffstat (limited to 'src/java/com/jogamp/common/os/AndroidVersion.java')
-rw-r--r--src/java/com/jogamp/common/os/AndroidVersion.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/java/com/jogamp/common/os/AndroidVersion.java b/src/java/com/jogamp/common/os/AndroidVersion.java
index adfb1ef..0e30602 100644
--- a/src/java/com/jogamp/common/os/AndroidVersion.java
+++ b/src/java/com/jogamp/common/os/AndroidVersion.java
@@ -85,10 +85,16 @@ public class AndroidVersion {
private static final CPUType getCPUTypeImpl(final String cpuABI) {
if( null == cpuABI ) {
return null;
+ } else if( cpuABI.equals("armv8-a") ||
+ cpuABI.equals("arm64-v8a") ) {
+ return CPUType.ARMv8_A;
+ } else if( cpuABI.equals("aarch64") ||
+ cpuABI.startsWith("arm64") ) {
+ return CPUType.ARM64;
} else if( cpuABI.equals("armeabi-v7a") ) {
return CPUType.ARMv7;
} else if( cpuABI.equals("armeabi") ||
- cpuABI.startsWith("arm") ) { // last chance ..
+ cpuABI.startsWith("arm") ) { // last 32bit chance ..
return CPUType.ARM;
} else if( cpuABI.equals("x86") ) {
return CPUType.X86_32;
@@ -103,6 +109,9 @@ public class AndroidVersion {
return null;
} else if( CPUFamily.ARM != cpuType.family ) {
return ABIType.GENERIC_ABI;
+ } else if( CPUType.ARM64 == cpuType ||
+ CPUType.ARMv8_A == cpuType ) {
+ return ABIType.EABI_AARCH64;
}
return ABIType.EABI_GNU_ARMEL; // FIXME: How will they name ABIType.EABI_GNU_ARMHF
}