aboutsummaryrefslogtreecommitdiffstats
path: root/make/lib
diff options
context:
space:
mode:
Diffstat (limited to 'make/lib')
-rw-r--r--make/lib/gluegen-cpptasks-android-armv6.xml118
-rw-r--r--make/lib/gluegen-cpptasks-android-armv7.xml12
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv6.xml (renamed from make/lib/gluegen-cpptasks-linux-armv4.xml)21
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv6hf.xml10
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv7.xml35
-rw-r--r--make/lib/gluegen-cpptasks-linux-armv7hf.xml35
6 files changed, 138 insertions, 93 deletions
diff --git a/make/lib/gluegen-cpptasks-android-armv6.xml b/make/lib/gluegen-cpptasks-android-armv6.xml
new file mode 100644
index 0000000..1be5c1f
--- /dev/null
+++ b/make/lib/gluegen-cpptasks-android-armv6.xml
@@ -0,0 +1,118 @@
+<?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-android-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="isAndroid" value="true" />
+ <property name="isAndroidARMv6" value="true" />
+ <property name="jvmDataModel.arg" value="-Djnlp.no.jvm.data.model.set=true" />
+ <property name="isCrosscompilation" value="true" />
+ <property name="android.abi" value="armeabi" />
+ <property name="isAbiEabiGnuArmel" value="true" />
+ <echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-android-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,declare.linux.android">
+ <echo message="Custom forced compiler Android NDK, linker.cfg.android" />
+ <compiler id="compiler.cfg.android" name="gcc">
+ <compilerarg value="--sysroot=${env.TARGET_PLATFORM_ROOT}" />
+ <!-- The default search dirs for 'gcc from $NDK_TOOLCHAIN/$TARGET_TRIPLE/bin will not find
+ subprograms properly (see gcc -print-search-dirs). Not sure if this is a bug in the NDK
+ or not. Need to explicitly indicate where subprograms are with -B.
+ NOTE: This is not necessary if using '$TARGET_TRIPLE-gcc' from $NDK_TOOLCHAIN/bin. -->
+ <compilerarg value="-B${env.NDK_TOOLCHAIN_ROOT}/libexec/gcc/${env.TARGET_TRIPLE}/${env.GCC_VERSION}" />
+
+ <compilerarg value="-ffunction-sections" />
+ <compilerarg value="-funwind-tables" />
+ <compilerarg value="-fstack-protector" />
+ <compilerarg value="-fpic" />
+
+ <compilerarg value="-march=armv6" />
+ <compilerarg value="-mfloat-abi=softfp" />
+ <compilerarg value="-marm" />
+
+ <compilerarg value="-g" if="c.compiler.use-debug" />
+ <compilerarg value="-O0" if="c.compiler.use-debug" />
+ <compilerarg value="-Os" unless="c.compiler.use-debug" />
+ <!--<compilerarg value="-O2" /> -->
+
+ <compilerarg value="-fomit-frame-pointer" />
+ <compilerarg value="-fno-strict-aliasing" />
+ <compilerarg value="-finline-limit=64" />
+ <compilerarg value="-Wa,--noexecstack" />
+ <includepath path="${env.NDK_TOOLCHAIN_ROOT}/lib/gcc/${env.TARGET_TRIPLE}/${env.GCC_VERSION}/include" /> <!-- for stdarg.h -->
+ <defineset>
+ <define name="__unix__" />
+ <define name="__ARM_ARCH_5__" />
+ <define name="__ARM_ARCH_5T__" />
+ <define name="__ARM_ARCH_5E__" />
+ <define name="__ARM_ARCH_5TE__" />
+ <define name="ANDROID" />
+ <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>
+ </compiler>
+
+ <linker id="linker.cfg.android" name="gcc">
+ <linkerarg value="--sysroot=${env.TARGET_PLATFORM_ROOT}" />
+ <linkerarg value="-fpic" />
+
+ <linkerarg value="-march=armv6" />
+ <linkerarg value="-mfloat-abi=softfp" />
+ <linkerarg value="-marm" />
+
+ <linkerarg value="-nostdlib" />
+ <linkerarg value="-Bdynamic" />
+ <linkerarg value="-Wl,-dynamic-linker,/system/bin/linker" />
+ <linkerarg value="-Wl,-z,nocopyreloc" />
+
+ <linkerarg value="--demangle" />
+ <linkerarg value="--gc-sections" />
+ <linkerarg value="--no-undefined" />
+ <!-- The gcc from $NDK_TOOLCHAIN/$TARGET_TRIPLE/bin needs to be told
+ where to find libgcc as the default location (gcc -print-search-dirs)
+ is not correct. Not sure if this is a bug in the NDK or not. We also
+ enforce that libgcc is linked after source files but before other shared
+ libraries. -->
+ <libset dir="${env.NDK_TOOLCHAIN_ROOT}/lib/gcc/${env.TARGET_TRIPLE}/${env.GCC_VERSION}" libs="gcc" />
+ <libset libs="c,m,dl" />
+ </linker>
+
+</target>
+
+<target name="gluegen.cpptasks.declare.compiler" depends="setup.java.home.dir">
+ <echo message="Custom forced Linux.x86 cross compile android" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.android" />
+ <property name="linker.cfg.id.base" value="linker.cfg.android" />
+ <property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/i386" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
+</target>
+
+<target name="declare.linux.android">
+ <echo message="android.arm" />
+ <property name="compiler.cfg.id" value="compiler.cfg.android" />
+ <property name="linker.cfg.id" value="linker.cfg.android" />
+</target>
+
+</project>
+
+
diff --git a/make/lib/gluegen-cpptasks-android-armv7.xml b/make/lib/gluegen-cpptasks-android-armv7.xml
index 65caa38..a172fb5 100644
--- a/make/lib/gluegen-cpptasks-android-armv7.xml
+++ b/make/lib/gluegen-cpptasks-android-armv7.xml
@@ -20,7 +20,7 @@
<property name="gluegen.cpptasks.detected.os" value="true" />
<property name="isUnix" value="true" />
<property name="isAndroid" value="true" />
- <property name="isAndroidARMv7" value="true" />
+ <property name="isAndroidARMv6" value="true" />
<property name="jvmDataModel.arg" value="-Djnlp.no.jvm.data.model.set=true" />
<property name="isCrosscompilation" value="true" />
<property name="android.abi" value="armeabi-v7a" />
@@ -46,11 +46,8 @@
<compilerarg value="-fpic" />
<compilerarg value="-march=armv7-a" />
- <!--compilerarg value="-march=armv5te" /-->
-
- <compilerarg value="-mtune=xscale" />
- <compilerarg value="-msoft-float" />
- <compilerarg value="-mthumb" />
+ <compilerarg value="-mfloat-abi=softfp" />
+ <compilerarg value="-marm" />
<compilerarg value="-g" if="c.compiler.use-debug" />
<compilerarg value="-O0" if="c.compiler.use-debug" />
@@ -80,7 +77,8 @@
<linkerarg value="-fpic" />
<linkerarg value="-march=armv7-a" />
- <!--linkerarg value="-march=armv5te" /-->
+ <linkerarg value="-mfloat-abi=softfp" />
+ <linkerarg value="-marm" />
<linkerarg value="-nostdlib" />
<linkerarg value="-Bdynamic" />
diff --git a/make/lib/gluegen-cpptasks-linux-armv4.xml b/make/lib/gluegen-cpptasks-linux-armv6.xml
index 8911a6a..d5267b8 100644
--- a/make/lib/gluegen-cpptasks-linux-armv4.xml
+++ b/make/lib/gluegen-cpptasks-linux-armv6.xml
@@ -13,27 +13,27 @@
Example: gluegen/make/make.gluegen.all.linux-x86.sh
-->
-<project name="GlueGen-cpptasks-linux-armv4" basedir="." >
+<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="isLinuxARMv7" 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-armv4' done"/>
+ <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 ARMv4t soft float" />
+ <echo message="Custom forced compiler Linux ARMv5te soft float" />
- <compiler id="compiler.cfg.linux.armv7" name="gcc">
+ <compiler id="compiler.cfg.linux.armv6" name="gcc">
<defineset>
<define name="__unix__"/>
<define name="__X11__" if="isX11"/>
@@ -42,20 +42,19 @@
<define name="NDEBUG" unless="c.compiler.use-debug"/>
</defineset>
<compilerarg value="-fpic" />
- <compilerarg value="-march=armv4t" />
+ <compilerarg value="-march=armv5te" />
<compilerarg value="-marm" />
- <compilerarg value="-mfloat-abi=soft" />
+ <compilerarg value="-mfloat-abi=softfp" />
</compiler>
- <linker id="linker.cfg.linux.armv7" name="gcc">
+ <linker id="linker.cfg.linux.armv6" name="gcc">
<linkerarg value="-fpic" />
- <linkerarg value="-march=armv4t" />
+ <linkerarg value="-march=armv5te" />
<linkerarg value="-marm" />
- <linkerarg value="-mfloat-abi=soft" />
+ <linkerarg value="-mfloat-abi=softfp" />
<linkerarg value="-nostdlib" />
<linkerarg value="-Bdynamic" />
</linker>
-
</target>
</project>
diff --git a/make/lib/gluegen-cpptasks-linux-armv6hf.xml b/make/lib/gluegen-cpptasks-linux-armv6hf.xml
index 2b2acb6..26f2db9 100644
--- a/make/lib/gluegen-cpptasks-linux-armv6hf.xml
+++ b/make/lib/gluegen-cpptasks-linux-armv6hf.xml
@@ -20,10 +20,10 @@
<property name="gluegen.cpptasks.detected.os" value="true" />
<property name="isUnix" value="true" />
<property name="isLinux" value="true" />
- <property name="isLinuxARMv7" 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="false" />
+ <property name="isCrosscompilation" value="true" />
<property name="isAbiEabiGnuArmhf" value="true" />
<echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-linux-armv6hf' done"/>
</target>
@@ -33,7 +33,7 @@
<target name="gluegen.cpptasks.configure.compiler" depends="setup.java.home.dir">
<echo message="Custom forced compiler Linux ARMv6t hard float" />
- <compiler id="compiler.cfg.linux.armv7hf" name="gcc">
+ <compiler id="compiler.cfg.linux.armv6" name="gcc">
<defineset>
<define name="__unix__"/>
<define name="__X11__" if="isX11"/>
@@ -44,10 +44,10 @@
<compilerarg value="-fpic" />
<compilerarg value="-march=armv6" />
<compilerarg value="-marm" />
- <compilerarg value="-mfloat-abi=hard" />
+ <!-- compilerarg value="-mfloat-abi=hard" / -->
</compiler>
- <linker id="linker.cfg.linux.armv7hf" name="gcc">
+ <linker id="linker.cfg.linux.armv6" name="gcc">
<linkerarg value="-fpic" />
<linkerarg value="-march=armv6" />
<linkerarg value="-marm" />
diff --git a/make/lib/gluegen-cpptasks-linux-armv7.xml b/make/lib/gluegen-cpptasks-linux-armv7.xml
deleted file mode 100644
index e07d58e..0000000
--- a/make/lib/gluegen-cpptasks-linux-armv7.xml
+++ /dev/null
@@ -1,35 +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-armv7" 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="isLinuxARMv7" 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-armv7' done"/>
-</target>
-
-<import file="${gluegen.root.abs-path}/make/gluegen-cpptasks-base.xml" optional="false" />
-
-</project>
-
-
diff --git a/make/lib/gluegen-cpptasks-linux-armv7hf.xml b/make/lib/gluegen-cpptasks-linux-armv7hf.xml
deleted file mode 100644
index 7e20f24..0000000
--- a/make/lib/gluegen-cpptasks-linux-armv7hf.xml
+++ /dev/null
@@ -1,35 +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-armv7hf" 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="isLinuxARMv7" 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="isAbiEabiGnuArmhf" value="true" />
- <echo message="gluegen.cpptasks.detect.os.custom: GLUEGEN_CPPTASKS_FILE 'gluegen-cpptasks-linux-armv7hf' done"/>
-</target>
-
-<import file="${gluegen.root.abs-path}/make/gluegen-cpptasks-base.xml" optional="false" />
-
-</project>
-
-