summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
Diffstat (limited to 'make')
-rw-r--r--make/build.xml8
-rwxr-xr-xmake/gluegen-cpptasks-base.xml2
-rw-r--r--make/lib/gluegen-cpptasks-linux-aarch64.xml59
l---------make/lib/toolchain/aarch64-linux-gnueabi/bin/c++1
l---------make/lib/toolchain/aarch64-linux-gnueabi/bin/cc1
l---------make/lib/toolchain/aarch64-linux-gnueabi/bin/g++1
l---------make/lib/toolchain/aarch64-linux-gnueabi/bin/gcc1
l---------make/lib/toolchain/aarch64-linux-gnueabi/bin/ld1
l---------make/lib/toolchain/aarch64-linux-gnueabi/bin/objdump1
l---------make/lib/toolchain/aarch64-linux-gnueabi/bin/strip1
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-aarch64-cross.sh38
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-aarch64.sh21
-rw-r--r--make/stub_includes/platform/glibc-compat-symbols.h8
13 files changed, 139 insertions, 4 deletions
diff --git a/make/build.xml b/make/build.xml
index d7abcd8..3bf0b10 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -276,6 +276,12 @@
<property name="linker.cfg.id" value="linker.cfg.linux.armv6" />
</target>
+ <target name="declare.linux.aarch64" if="isLinuxARM64">
+ <echo message="Linux.aarch64" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux.aarch64" />
+ <property name="linker.cfg.id" value="linker.cfg.linux.aarch64" />
+ </target>
+
<target name="declare.linux.alpha" if="isLinuxAlpha">
<echo message="Linux.alpha" />
<property name="compiler.cfg.id" value="compiler.cfg.linux" />
@@ -324,7 +330,7 @@
<property name="linker.cfg.id" value="linker.cfg.linux.sparc" />
</target>
- <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6" if="isLinux" >
+ <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6,declare.linux.aarch64" if="isLinux" >
<property name="c.src.dir.os" value="unix" />
</target>
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index 01d6146..04b6628 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -1467,7 +1467,7 @@
<echo message="Linux.aarch64" />
<property name="compiler.cfg.id.base" value="compiler.cfg.linux.aarch64" />
<property name="linker.cfg.id.base" value="linker.cfg.linux.aarch64" />
- <property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/arm" />
+ <property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/aarch64" />
</target>
<target name="gluegen.cpptasks.declare.compiler.linux.ia64" if="isLinuxIA64">
diff --git a/make/lib/gluegen-cpptasks-linux-aarch64.xml b/make/lib/gluegen-cpptasks-linux-aarch64.xml
new file mode 100644
index 0000000..8606fae
--- /dev/null
+++ b/make/lib/gluegen-cpptasks-linux-aarch64.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ This is an example of how to add custom compiler/linker
+ arguments for a crosscompiler.
+
+ You can use such files with setting the property 'gluegen-cpptasks.file', ie:
+
+ -Dgluegen-cpptasks.file=`pwd`/lib/gluegen-cpptasks-linux-aarch64.xml
+
+ In case you want to compile for 32bit on a 64bit machine,
+ you might also need to set the 'os.arch' to 'x86'.
+ Example: gluegen/make/make.gluegen.all.linux-x86.sh
+ -->
+
+<project name="GlueGen-cpptasks-linux-aarch64" basedir="." >
+
+<!-- Set OS and ARCH for crosscompilation compiler configuration -->
+<target name="gluegen.cpptasks.detect.os.custom">
+ <property name="gluegen.cpptasks.detected.os" value="true" />
+ <property name="isUnix" value="true" />
+ <property name="isLinux" value="true" />
+ <property name="isLinuxARM64" value="true" />
+ <property name="isX11" value="true" />
+ <property name="jvmDataModel.arg" value="-Djnlp.no.jvm.data.model.set=true" />
+ <property name="isAbiEabiGnuArmhf" value="true" />
+ <echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-linux-aarch64' done"/>
+</target>
+
+<import file="${gluegen.root.abs-path}/make/gluegen-cpptasks-base.xml" optional="false" />
+
+<target name="gluegen.cpptasks.configure.compiler" depends="setup.java.home.dir">
+ <echo message="Custom forced compiler Linux aarch64 hard float" />
+
+ <compiler id="compiler.cfg.linux.aarch64" name="gcc">
+ <defineset>
+ <define name="__unix__"/>
+ <define name="__X11__" if="isX11"/>
+ <define name="_DEBUG" if="c.compiler.use-debug"/>
+ <define name="DEBUG" if="c.compiler.use-debug"/>
+ <define name="NDEBUG" unless="c.compiler.use-debug"/>
+ </defineset>
+ <compilerarg value="-fpic" />
+ <compilerarg value="-include"/>
+ <compilerarg value="${gluegen.root.abs-path}/make/stub_includes/platform/glibc-compat-symbols.h" />
+ </compiler>
+
+ <linker id="linker.cfg.linux.aarch64" name="gcc">
+ <linkerarg value="-fpic" />
+ <linkerarg value="-march=armv8-a" />
+ <linkerarg value="-nostdlib" />
+ <linkerarg value="-Bdynamic" />
+ <linkerarg value="-static-libgcc" if="isGCC"/>
+ <linkerarg value="-static-libstdc++" if="isGCC"/>
+ </linker>
+
+</target>
+
+</project>
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/scripts/make.gluegen.all.linux-aarch64.sh b/make/scripts/make.gluegen.all.linux-aarch64.sh
new file mode 100755
index 0000000..53d2851
--- /dev/null
+++ b/make/scripts/make.gluegen.all.linux-aarch64.sh
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+# -Dc.compiler.debug=true
+# -Dgluegen.cpptasks.detected.os=true \
+# -DisUnix=true \
+# -DisLinux=true \
+# -DisLinuxX86=true \
+# -DisX11=true \
+
+# aarch64-linux-gnue == aarch64 triplet
+export TARGET_PLATFORM_LIBS=/usr/lib/aarch64-linux-gnu
+export TARGET_JAVA_LIBS=/usr/lib/jvm/java-8-openjdk-aarch64/jre/lib/aarch64
+
+export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-aarch64.xml"
+
+#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.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__)