From 00ea29eb954a29aaf2fd2adffd6677e580ab2850 Mon Sep 17 00:00:00 2001 From: Xerxes Ranby Date: Fri, 27 May 2016 08:49:02 +0200 Subject: Bug 1295: Add linux-aarch64 GNU/Linux AArch64 support make/build.xml: New target declare.linux.aarch64 Update target declare.linux to depend on declare.linux.aarch64 make/gluegen-cpp-tasks-base.xml: Fix aarch64 jre/lib/arm -> jre/lib/aarch64 make/lib/gluegen-cpptasks-linux-aarch64.xml: Added make/scripts/make.gluegen.all.linux-aarch64.sh: Added Tested on DragonBoard 410c running Linaro Debian Platform: LINUX / Linux 4.4.8-linaro-lt-qcom (4.4.8), aarch64 (ARM64, EABI_AARCH64), 4 cores, littleEndian true MachineDataInfo: runtimeValidated true, 32Bit false, primitive size / alignment: int8 1 / 1, int16 2 / 2 int 4 / 4, long 8 / 8 int32 4 / 4, int64 8 / 8 float 4 / 4, double 8 / 8, ldouble 16 / 16 pointer 8 / 8, page 4096 Platform: Java Version: 1.8.0_91 (1.8.0u91), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment Platform: Java Vendor: Oracle Corporation, http://java.oracle.com/, JavaSE: true, Java6: true, AWT enabled: true Signed-off-by: Xerxes Ranby --- make/lib/gluegen-cpptasks-linux-aarch64.xml | 62 +++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 make/lib/gluegen-cpptasks-linux-aarch64.xml (limited to 'make/lib') diff --git a/make/lib/gluegen-cpptasks-linux-aarch64.xml b/make/lib/gluegen-cpptasks-linux-aarch64.xml new file mode 100644 index 0000000..45a7fdb --- /dev/null +++ b/make/lib/gluegen-cpptasks-linux-aarch64.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From e7db4d356f264b45d178839798b7d3d552019fc1 Mon Sep 17 00:00:00 2001 From: Xerxes Rånby Date: Mon, 12 Dec 2016 08:32:08 +0100 Subject: Bug 1295: Add linux-aarch64 GNU/Linux AArch64 crosscompile support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit make/lib/gluegen-cpptasks-linux-aarch64.xml: Add missing -DisLinux=true required when crosscompiling Remove -marm -mfloat-abi=hard flags unrecognisable by aarch64 crosscompile toolchain make/lib/toolchain/aarch64-linux-gnueabi/bin/*: Symlink to /usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-* make/scripts/make.gluegen.all.linux-aarch64-cross.sh: New crosscompile script make/stub_includes/platform/glibc-compat-symbols.h: glibc 2.17 is the first glibc version that support aarch64 however memcpy is not versioned for aarch64 Disable versioning for linux glibc/aarch64 Signed-off-by: Xerxes Rånby --- make/lib/gluegen-cpptasks-linux-aarch64.xml | 5 +-- make/lib/toolchain/aarch64-linux-gnueabi/bin/c++ | 1 + make/lib/toolchain/aarch64-linux-gnueabi/bin/cc | 1 + make/lib/toolchain/aarch64-linux-gnueabi/bin/g++ | 1 + make/lib/toolchain/aarch64-linux-gnueabi/bin/gcc | 1 + make/lib/toolchain/aarch64-linux-gnueabi/bin/ld | 1 + .../toolchain/aarch64-linux-gnueabi/bin/objdump | 1 + make/lib/toolchain/aarch64-linux-gnueabi/bin/strip | 1 + .../make.gluegen.all.linux-aarch64-cross.sh | 38 ++++++++++++++++++++++ make/stub_includes/platform/glibc-compat-symbols.h | 8 +++-- 10 files changed, 52 insertions(+), 6 deletions(-) create mode 120000 make/lib/toolchain/aarch64-linux-gnueabi/bin/c++ create mode 120000 make/lib/toolchain/aarch64-linux-gnueabi/bin/cc create mode 120000 make/lib/toolchain/aarch64-linux-gnueabi/bin/g++ create mode 120000 make/lib/toolchain/aarch64-linux-gnueabi/bin/gcc create mode 120000 make/lib/toolchain/aarch64-linux-gnueabi/bin/ld create mode 120000 make/lib/toolchain/aarch64-linux-gnueabi/bin/objdump create mode 120000 make/lib/toolchain/aarch64-linux-gnueabi/bin/strip create mode 100755 make/scripts/make.gluegen.all.linux-aarch64-cross.sh (limited to 'make/lib') diff --git a/make/lib/gluegen-cpptasks-linux-aarch64.xml b/make/lib/gluegen-cpptasks-linux-aarch64.xml index 45a7fdb..8606fae 100644 --- a/make/lib/gluegen-cpptasks-linux-aarch64.xml +++ b/make/lib/gluegen-cpptasks-linux-aarch64.xml @@ -19,6 +19,7 @@ + @@ -40,8 +41,6 @@ - - @@ -49,8 +48,6 @@ - - diff --git a/make/lib/toolchain/aarch64-linux-gnueabi/bin/c++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/c++ new file mode 120000 index 0000000..15c86f4 --- /dev/null +++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/c++ @@ -0,0 +1 @@ +/usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-c++ \ No newline at end of file diff --git a/make/lib/toolchain/aarch64-linux-gnueabi/bin/cc b/make/lib/toolchain/aarch64-linux-gnueabi/bin/cc new file mode 120000 index 0000000..925bc00 --- /dev/null +++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/cc @@ -0,0 +1 @@ +/usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-cc \ No newline at end of file diff --git a/make/lib/toolchain/aarch64-linux-gnueabi/bin/g++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/g++ new file mode 120000 index 0000000..eabecfb --- /dev/null +++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/g++ @@ -0,0 +1 @@ +/usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-g++ \ No newline at end of file diff --git a/make/lib/toolchain/aarch64-linux-gnueabi/bin/gcc b/make/lib/toolchain/aarch64-linux-gnueabi/bin/gcc new file mode 120000 index 0000000..9b6db98 --- /dev/null +++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/gcc @@ -0,0 +1 @@ +/usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-gcc \ No newline at end of file diff --git a/make/lib/toolchain/aarch64-linux-gnueabi/bin/ld b/make/lib/toolchain/aarch64-linux-gnueabi/bin/ld new file mode 120000 index 0000000..38af46a --- /dev/null +++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/ld @@ -0,0 +1 @@ +/usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ld \ No newline at end of file diff --git a/make/lib/toolchain/aarch64-linux-gnueabi/bin/objdump b/make/lib/toolchain/aarch64-linux-gnueabi/bin/objdump new file mode 120000 index 0000000..3fafc10 --- /dev/null +++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/objdump @@ -0,0 +1 @@ +/usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-objdump \ No newline at end of file diff --git a/make/lib/toolchain/aarch64-linux-gnueabi/bin/strip b/make/lib/toolchain/aarch64-linux-gnueabi/bin/strip new file mode 120000 index 0000000..de7e179 --- /dev/null +++ b/make/lib/toolchain/aarch64-linux-gnueabi/bin/strip @@ -0,0 +1 @@ +/usr/local/x-tools/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-strip \ No newline at end of file diff --git a/make/scripts/make.gluegen.all.linux-aarch64-cross.sh b/make/scripts/make.gluegen.all.linux-aarch64-cross.sh new file mode 100755 index 0000000..5d050cd --- /dev/null +++ b/make/scripts/make.gluegen.all.linux-aarch64-cross.sh @@ -0,0 +1,38 @@ +#! /bin/sh + +SDIR=`dirname $0` + +if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then + . $SDIR/setenv-build-jogl-x86_64.sh +fi + +# aarch64-linux-gnueabi == aarch64 triplet +PATH=`pwd`/lib/toolchain/aarch64-linux-gnueabi/bin:$PATH +export PATH + +# -Dc.compiler.debug=true +# -Dgluegen.cpptasks.detected.os=true \ +# -DisUnix=true \ +# -DisLinux=true \ +# -DisLinuxARM64=true \ +# -DisX11=true \ + +export TARGET_PLATFORM_ROOT=/opt-linux-arm64 +export TARGET_PLATFORM_LIBS=$TARGET_PLATFORM_ROOT/usr/lib +export TARGET_JAVA_LIBS=$TARGET_PLATFORM_ROOT/jre/lib/aarch64 + +export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-aarch64.xml" + +#export JUNIT_DISABLED="true" +export JUNIT_RUN_ARG0="-Dnewt.test.Screen.disableScreenMode" + +export SOURCE_LEVEL=1.6 +export TARGET_LEVEL=1.6 +export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar + +#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org" +export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet" + +ant \ + -Drootrel.build=build-linux-aarch64 \ + $* 2>&1 | tee make.gluegen.all.linux-aarch64-cross.log diff --git a/make/stub_includes/platform/glibc-compat-symbols.h b/make/stub_includes/platform/glibc-compat-symbols.h index 1163c78..e390bcb 100644 --- a/make/stub_includes/platform/glibc-compat-symbols.h +++ b/make/stub_includes/platform/glibc-compat-symbols.h @@ -18,7 +18,9 @@ #if defined(__linux__) /* Actually we like to test whether we link against GLIBC .. */ #if defined(__GNUC__) #if defined(__aarch64__) - #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4"); + /* glibc 2.17 is the first glibc version that support aarch64 + however memcpy is not versioned for aarch64 */ + #define GLIBC_COMPAT_SYMBOL(FFF) #elif defined(__arm__) #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4"); #elif defined(__amd64__) @@ -28,7 +30,9 @@ #endif /*__amd64__*/ #elif defined(__clang__) #if defined(__aarch64__) - #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.4"); + /* glibc 2.17 is the first glibc version that support aarch64 + however memcpy is not versioned for aarch64 */ + #define GLIBC_COMPAT_SYMBOL(FFF) #elif defined(__arm__) #define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.4"); #elif defined(__amd64__) -- cgit v1.2.3