summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-04-07 22:34:37 +0200
committerSven Gothel <[email protected]>2019-04-07 22:34:37 +0200
commit117565b7d8771b6c9c2144b2d1ef5a131446e058 (patch)
tree5ba3405ee8a354fabae5a81c1445a1aea8d9b8e0
parent12047cae51b5a594b38c9e162f135352452c46fd (diff)
Bug 1190: Fix arm6hf + aarch64 gcc options, adapt glibc-compat-symbols.h
- arm6hf needs the fpu to be specified, we still use the lowest armv6 hard float denominator - aarch64 shall have the -march compiler argument as well - glibc-compat-symbols.h Finally drop the glibc versioning on memcpy for both
-rwxr-xr-xmake/gluegen-cpptasks-base.xml14
-rw-r--r--make/lib/gluegen-cpptasks-linux-aarch64-ontarget.xml1
-rw-r--r--make/lib/gluegen-cpptasks-linux-aarch64.xml1
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv6.xml66
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv6hf-ontarget.xml6
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv6hf.xml6
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-armv6-cross.sh51
-rwxr-xr-xmake/scripts/make.gluegen.all.linux-armv6.sh21
-rw-r--r--make/stub_includes/platform/glibc-compat-symbols.h8
9 files changed, 28 insertions, 146 deletions
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index 0a6fb25..0f44566 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -238,7 +238,7 @@
by a custom file set in property 'gluegen-cpptasks.file'
or environment var 'GLUEGEN_CPPTASKS_FILE'
- See 'lib/gluegen-cpptasks-linux-armv6.xml' which sets OS and ARCH
+ See 'lib/gluegen-cpptasks-linux-armv6hf.xml' which sets OS and ARCH
for crosscompilation.
-->
<target name="gluegen.cpptasks.detect.os.custom">
@@ -1041,8 +1041,8 @@
</compiler>
<!-- Using default compiler settings - utilize:
- - lib/gluegen-cpptasks-linux-armv6.xml (armv5te + softfp), or
- lib/gluegen-cpptasks-linux-armv6hf.xml (armv6 + hardfp)
+ - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit)
for official JogAmp builds! -->
<compiler id="compiler.cfg.linux.armv6" name="${gcc.compat.compiler}">
<defineset>
@@ -1057,6 +1057,10 @@
<compilerarg value="${gluegen.root.abs-path}/make/stub_includes/platform/glibc-compat-symbols.h" />
</compiler>
+ <!-- Using default compiler settings - utilize:
+ - lib/gluegen-cpptasks-linux-armv6hf.xml (armv6 + hardfp)
+ - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit)
+ for official JogAmp builds! -->
<compiler id="compiler.cfg.linux.aarch64" name="${gcc.compat.compiler}">
<defineset>
<define name="__LP64__" /> <!-- default pre-defined macro for 64bit unix -->
@@ -1279,8 +1283,8 @@
</linker>
<!-- Using default compiler settings - utilize:
- - lib/gluegen-cpptasks-linux-armv6.xml (armv5te + softfp), or
- lib/gluegen-cpptasks-linux-armv6hf.xml (armv6 + hardfp)
+ - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit)
for official JogAmp builds! -->
<linker id="linker.cfg.linux.armv6" name="${gcc.compat.compiler}">
<linkerarg value="-fpic" />
@@ -1290,6 +1294,10 @@
<linkerarg value="-static-libstdc++" if="isGCC"/>
</linker>
+ <!-- Using default compiler settings - utilize:
+ - lib/gluegen-cpptasks-linux-armv6hf.xml (armv6 + hardfp)
+ - lib/gluegen-cpptasks-linux-aarch64.xml (armv8 64bit)
+ for official JogAmp builds! -->
<linker id="linker.cfg.linux.aarch64" name="${gcc.compat.compiler}">
<linkerarg value="-fpic" />
<linkerarg value="-nostdlib" />
diff --git a/make/lib/gluegen-cpptasks-linux-aarch64-ontarget.xml b/make/lib/gluegen-cpptasks-linux-aarch64-ontarget.xml
index 8606fae..57af368 100644
--- a/make/lib/gluegen-cpptasks-linux-aarch64-ontarget.xml
+++ b/make/lib/gluegen-cpptasks-linux-aarch64-ontarget.xml
@@ -41,6 +41,7 @@
<define name="NDEBUG" unless="c.compiler.use-debug"/>
</defineset>
<compilerarg value="-fpic" />
+ <compilerarg value="-march=armv8-a" />
<compilerarg value="-include"/>
<compilerarg value="${gluegen.root.abs-path}/make/stub_includes/platform/glibc-compat-symbols.h" />
</compiler>
diff --git a/make/lib/gluegen-cpptasks-linux-aarch64.xml b/make/lib/gluegen-cpptasks-linux-aarch64.xml
index 5e3845a..472f81a 100644
--- a/make/lib/gluegen-cpptasks-linux-aarch64.xml
+++ b/make/lib/gluegen-cpptasks-linux-aarch64.xml
@@ -42,6 +42,7 @@
<define name="NDEBUG" unless="c.compiler.use-debug"/>
</defineset>
<compilerarg value="-fpic" />
+ <compilerarg value="-march=armv8-a" />
<compilerarg value="-include"/>
<compilerarg value="${gluegen.root.abs-path}/make/stub_includes/platform/glibc-compat-symbols.h" />
</compiler>
diff --git a/make/lib/gluegen-cpptasks-linux-armv6.xml b/make/lib/gluegen-cpptasks-linux-armv6.xml
deleted file mode 100644
index 5b65b42..0000000
--- a/make/lib/gluegen-cpptasks-linux-armv6.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?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-32bit.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-armv6" 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="isLinuxARMv6" value="true" />
- <property name="isX11" value="true" />
- <property name="jvmDataModel.arg" value="-Djnlp.no.jvm.data.model.set=true" />
- <property name="isCrosscompilation" value="true" />
- <property name="isAbiEabiGnuArmel" value="true" />
- <echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-linux-armv6' 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 ARMv5te soft float" />
-
- <compiler id="compiler.cfg.linux.armv6" 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="-march=armv5te" />
- <compilerarg value="-marm" />
- <compilerarg value="-mfloat-abi=softfp" />
- <compilerarg value="-include"/>
- <compilerarg value="${gluegen.root.abs-path}/make/stub_includes/platform/glibc-compat-symbols.h" />
- </compiler>
-
- <linker id="linker.cfg.linux.armv6" name="gcc">
- <linkerarg value="-fpic" />
- <linkerarg value="-march=armv5te" />
- <linkerarg value="-marm" />
- <linkerarg value="-mfloat-abi=softfp" />
- <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/gluegen-cpptasks-linux-armv6hf-ontarget.xml b/make/lib/gluegen-cpptasks-linux-armv6hf-ontarget.xml
index 03b983c..5e03246 100644
--- a/make/lib/gluegen-cpptasks-linux-armv6hf-ontarget.xml
+++ b/make/lib/gluegen-cpptasks-linux-armv6hf-ontarget.xml
@@ -42,8 +42,9 @@
</defineset>
<compilerarg value="-fpic" />
<compilerarg value="-march=armv6" />
- <compilerarg value="-marm" />
+ <compilerarg value="-mfpu=vfp" />
<compilerarg value="-mfloat-abi=hard" />
+ <compilerarg value="-marm" />
<compilerarg value="-include"/>
<compilerarg value="${gluegen.root.abs-path}/make/stub_includes/platform/glibc-compat-symbols.h" />
</compiler>
@@ -51,8 +52,9 @@
<linker id="linker.cfg.linux.armv6" name="gcc">
<linkerarg value="-fpic" />
<linkerarg value="-march=armv6" />
- <linkerarg value="-marm" />
+ <linkerarg value="-mfpu=vfp" />
<linkerarg value="-mfloat-abi=hard" />
+ <linkerarg value="-marm" />
<linkerarg value="-nostdlib" />
<linkerarg value="-Bdynamic" />
<linkerarg value="-static-libgcc" if="isGCC"/>
diff --git a/make/lib/gluegen-cpptasks-linux-armv6hf.xml b/make/lib/gluegen-cpptasks-linux-armv6hf.xml
index df5a91c..a7f15a4 100644
--- a/make/lib/gluegen-cpptasks-linux-armv6hf.xml
+++ b/make/lib/gluegen-cpptasks-linux-armv6hf.xml
@@ -43,8 +43,9 @@
</defineset>
<compilerarg value="-fpic" />
<compilerarg value="-march=armv6" />
- <compilerarg value="-marm" />
+ <compilerarg value="-mfpu=vfp" />
<compilerarg value="-mfloat-abi=hard" />
+ <compilerarg value="-marm" />
<compilerarg value="-include"/>
<compilerarg value="${gluegen.root.abs-path}/make/stub_includes/platform/glibc-compat-symbols.h" />
</compiler>
@@ -52,8 +53,9 @@
<linker id="linker.cfg.linux.armv6" name="gcc">
<linkerarg value="-fpic" />
<linkerarg value="-march=armv6" />
- <linkerarg value="-marm" />
+ <linkerarg value="-mfpu=vfp" />
<linkerarg value="-mfloat-abi=hard" />
+ <linkerarg value="-marm" />
<linkerarg value="-nostdlib" />
<linkerarg value="-Bdynamic" />
<linkerarg value="-static-libgcc" if="isGCC"/>
diff --git a/make/scripts/make.gluegen.all.linux-armv6-cross.sh b/make/scripts/make.gluegen.all.linux-armv6-cross.sh
deleted file mode 100755
index c8c8b8a..0000000
--- a/make/scripts/make.gluegen.all.linux-armv6-cross.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/sh
-
-SDIR=`dirname $0`
-
-if [ -e $SDIR/setenv-build-jogl-x86_64.sh ] ; then
- . $SDIR/setenv-build-jogl-x86_64.sh
-fi
-
-# arm-linux-gnueabi == armel triplet
-PATH=`pwd`/lib/toolchain/armsf-linux-gnueabi/bin:$PATH
-export PATH
-
-# -Dc.compiler.debug=true
-# -Dgluegen.cpptasks.detected.os=true \
-# -DisUnix=true \
-# -DisLinux=true \
-# -DisLinuxARMv6=true \
-# -DisX11=false \
-
-export NODE_LABEL=.
-
-export HOST_UID=jogamp
-export HOST_IP=jogamp02
-export HOST_RSYNC_ROOT=PROJECTS/JOGL
-
-export TARGET_UID=jogamp
-export TARGET_IP=panda01
-export TARGET_ROOT=/home/jogamp/projects-cross
-export TARGET_ANT_HOME=/usr/share/ant
-
-export TARGET_PLATFORM_ROOT=/opt-linux-armv6-armel
-export TARGET_PLATFORM_LIBS=$TARGET_PLATFORM_ROOT/usr/lib
-export TARGET_JAVA_LIBS=$TARGET_PLATFORM_ROOT/jre/lib/arm
-
-export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6.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-armv6 \
- $* 2>&1 | tee make.gluegen.all.linux-armv6-cross.log
-
-
diff --git a/make/scripts/make.gluegen.all.linux-armv6.sh b/make/scripts/make.gluegen.all.linux-armv6.sh
deleted file mode 100755
index 0ebf550..0000000
--- a/make/scripts/make.gluegen.all.linux-armv6.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh
-
-# -Dc.compiler.debug=true
-# -Dgluegen.cpptasks.detected.os=true \
-# -DisUnix=true \
-# -DisLinux=true \
-# -DisLinuxX86=true \
-# -DisX11=true \
-
-# arm-linux-gnueabi == armel triplet
-export TARGET_PLATFORM_LIBS=/usr/lib/arm-linux-gnueabi
-export TARGET_JAVA_LIBS=/usr/lib/jvm/default-java/jre/lib/arm
-
-export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-armv6.xml"
-
-#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
-export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
-
-ant \
- -Drootrel.build=build-linux-armv6 \
- $* 2>&1 | tee make.gluegen.all.linux-armv6.log
diff --git a/make/stub_includes/platform/glibc-compat-symbols.h b/make/stub_includes/platform/glibc-compat-symbols.h
index e390bcb..d8d0d17 100644
--- a/make/stub_includes/platform/glibc-compat-symbols.h
+++ b/make/stub_includes/platform/glibc-compat-symbols.h
@@ -22,7 +22,10 @@
however memcpy is not versioned for aarch64 */
#define GLIBC_COMPAT_SYMBOL(FFF)
#elif defined(__arm__)
+ /** On recent toolchain memcpy is no more versioned for arm
#define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+ */
+ #define GLIBC_COMPAT_SYMBOL(FFF)
#elif defined(__amd64__)
#define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
#else
@@ -34,7 +37,10 @@
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");
+ /** On recent toolchain memcpy is no more versioned for arm
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.4");
+ */
+ #define GLIBC_COMPAT_SYMBOL(FFF)
#elif defined(__amd64__)
#define GLIBC_COMPAT_SYMBOL(FFF) asm(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
#else