aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-07-20 07:30:48 +0200
committerSven Gothel <[email protected]>2011-07-20 07:30:48 +0200
commit0a8e1566c766f3b5a5e71b5d80500034f1a614a8 (patch)
treea00e98b531393652822d045c77d2da6e185a230a /make
parent846c64d71d0e07ce1f5b4955eba8b49bfa0b5a22 (diff)
Cleanup: Platform CPU enum, MachineDescription,
Platform: - enum CPUFamily is part of CPUType - DALVIK -> ANDROID - ARM: ARM + ARMv[567] MachineDescription - self contained - static size/alignment Config (enum) for unix32, unix64, win32, win64 and armeabi - add 'long double' - Removed MachineDescription32Bit, MachineDescription64Bit - createStatic(..) uses OS/CPU to fetch best match if not at runtime FIXES: JavaEmitter's struct-emit: Proper 32/64 struct sizes TODO: StructAccessor's mapping to <Type>Buffer w/ index os sizeof(<Type>) doesn't work, since offset may not be multiple of sizeof(<Type>)! i.e. typedef struct { int8_t bits1; // +1 - 0 // +3 (p32) int32_t id; // +4 - 4 int8_t bits2; // +1 - 8 // +3 (p32) - int64_t long0; // +8 - 12 so "longBuffer.get(<type-sized index>)" is invalid, but "byteBuffer.getLong(<byte index>)" must be done. The actual impl. doesn't matter, hence dropping the other nio type mappings is good.
Diffstat (limited to 'make')
-rw-r--r--make/build-crosscompile.xml86
-rwxr-xr-xmake/gluegen-cpptasks-base.xml35
2 files changed, 19 insertions, 102 deletions
diff --git a/make/build-crosscompile.xml b/make/build-crosscompile.xml
deleted file mode 100644
index aba6e44..0000000
--- a/make/build-crosscompile.xml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Document : build-crosscompile.xml
- Created on : November 18, 2009, 3:38 PM
- Author : Michael Bien
- Description:
- crosscompiler configuration and ant task for crosscompiling for
- linux32/64 and win32/64 on linux64 as host system.
--->
-<project name="gluegen-crosscompiler" basedir="." default="gluegen.cross-compile">
-
- <import file="build.xml"/>
-
- <!-- TODO remove hardcoded path -->
- <property name="java.includes.dir.windows" value="/media/store/gluegenSetup/win32"/>
-
- <!-- crosscompiles to other platforms, requirement: linux64 host os -->
- <target name="gluegen.cross-compile">
-
- <echo message=" - - - cross-compiling gluegen natives - - - "/>
-
- <antcall target="build.nativelibrary" inheritall="false">
- <param name="namespace" value="linux-amd64"/>
- <param name="crosscompile" value="true"/>
- <param name="build.dir" value="${build.dir}"/>
- <param name="isLinuxAMD64" value="true"/>
- <param name="isLinux" value="true"/>
- <param name="isUnix" value="true"/>
- <param name="isX11" value="true"/>
- </antcall>
-
- <antcall target="build.nativelibrary" inheritall="false">
- <param name="namespace" value="linux-x86"/>
- <param name="crosscompile" value="true"/>
- <param name="build.dir" value="${build.dir}"/>
- <param name="isLinuxX86" value="true"/>
- <param name="isLinux" value="true"/>
- <param name="isUnix" value="true"/>
- <param name="isX11" value="true"/>
- </antcall>
-
- <!-- use mingw crosscompiler to compile for win32 and win64 (linux64 only) -->
- <antcall target="build.nativelibrary" inheritall="false">
- <param name="namespace" value="linux-amd64"/>
- <param name="crosscompile" value="true"/>
- <param name="build.dir" value="${build.dir}"/>
- <param name="isLinuxAMD64" value="true"/>
- <param name="isLinux" value="true"/>
- <param name="isUnix" value="true"/>
- <param name="isX11" value="true"/>
-
- <!-- overwrite -->
- <param name="java.includes.dir.platform" value="${java.includes.dir.windows}"/>
- <param name="compiler.cfg.id" value="compiler.cfg.linux64.mingw64"/>
- <param name="linker.cfg.id" value="linker.cfg.linux64.mingw64.gluegen"/>
- </antcall>
-
- <antcall target="build.nativelibrary" inheritall="false">
- <param name="namespace" value="linux-x86"/>
- <param name="crosscompile" value="true"/>
- <param name="build.dir" value="${build.dir}"/>
- <param name="isLinuxX86" value="true"/>
- <param name="isLinux" value="true"/>
- <param name="isUnix" value="true"/>
- <param name="isX11" value="true"/>
-
- <!-- overwrite -->
- <param name="java.includes.dir.platform" value="${java.includes.dir.windows}"/>
- <param name="compiler.cfg.id" value="compiler.cfg.linux64.mingw32"/>
- <param name="linker.cfg.id" value="linker.cfg.linux64.mingw32.gluegen"/>
- </antcall>
-
- <echo message=" - - - gluegen natives cross-compiled - - - "/>
-
- </target>
-
-
- <target name="configure.crosscompiler">
- <linker id="linker.cfg.linux64.mingw64.gluegen" extends="linker.cfg.linux64.mingw64">
- </linker>
-
- <linker id="linker.cfg.linux64.mingw32.gluegen" extends="linker.cfg.linux64.mingw32">
- </linker>
- </target>
-
-</project> \ No newline at end of file
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
index 5be1361..7ea3da4 100755
--- a/make/gluegen-cpptasks-base.xml
+++ b/make/gluegen-cpptasks-base.xml
@@ -24,7 +24,7 @@
- isLinuxAMD64
- isLinuxIA64
- isLinuxX86
- - isLinuxARM
+ - isLinuxARMv7l
- isOSX
- isOSXPPC
- isSolaris
@@ -94,7 +94,7 @@
-
- compiler.cfg.linux
- compiler.cfg.linux.amd64
- - compiler.cfg.linux.arm7
+ - compiler.cfg.linux.armv7l
- compiler.cfg.solaris
- compiler.cfg.solaris.sparcv9
- compiler.cfg.solaris.amd64
@@ -106,7 +106,7 @@
- compiler.cfg.hpux
- linker.cfg.linux
- linker.cfg.linux.amd64
- - linker.cfg.linux.arm7
+ - linker.cfg.linux.armv7l
- linker.cfg.freebsd.x86
- linker.cfg.freebsd.amd64
- linker.cfg.solaris
@@ -222,10 +222,13 @@
<condition property="isHPUX">
<os name="HP-UX" />
</condition>
- <condition property="isLinuxARM7">
+ <condition property="isLinuxARMv7l">
<and>
<istrue value="${isLinux}" />
- <os arch="arm" />
+ <or>
+ <os arch="arm" />
+ <os arch="armv7l" />
+ </or>
</and>
</condition>
<condition property="isLinuxX86">
@@ -324,7 +327,7 @@
<echo message="LinuxAMD64=${isLinuxAMD64}" />
<echo message="LinuxIA64=${isLinuxIA64}" />
<echo message="LinuxX86=${isLinuxX86}" />
- <echo message="LinuxARM=${isLinuxARM}" />
+ <echo message="LinuxARMv7l=${isLinuxARMv7l}" />
<echo message="OS X=${isOSX}" />
<echo message="OS X PPC=${use.macosppc}" />
<echo message="OS X x32=${use.macosx32}" />
@@ -366,11 +369,11 @@
<property name="os.and.arch" value="linux-i586" />
</target>
- <target name="gluegen.cpptasks.detect.os.linux.arm7" unless="gluegen.cpptasks.detected.os.2" if="isLinuxARM7">
- <property name="os.and.arch" value="linux-arm7" />
+ <target name="gluegen.cpptasks.detect.os.linux.armv7l" unless="gluegen.cpptasks.detected.os.2" if="isLinuxARMv7l">
+ <property name="os.and.arch" value="linux-armv7l" />
</target>
- <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.arm7" unless="gluegen.cpptasks.detected.os.2" />
+ <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.armv7l" unless="gluegen.cpptasks.detected.os.2" />
<target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
<property name="native.library.suffix" value="*lib" />
@@ -592,7 +595,7 @@
</defineset>
</compiler>
- <compiler id="compiler.cfg.linux.arm7" name="gcc">
+ <compiler id="compiler.cfg.linux.armv7l" name="gcc">
<defineset>
<define name="__unix__"/>
<define name="_DEBUG" if="c.compiler.use-debug"/>
@@ -770,7 +773,7 @@
<linkerarg value="-m64"/>
</linker>
- <linker id="linker.cfg.linux.arm7" name="gcc">
+ <linker id="linker.cfg.linux.armv7l" name="gcc">
</linker>
<linker id="linker.cfg.hpux" name="aCC">
@@ -908,10 +911,10 @@
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/i386" />
</target>
- <target name="gluegen.cpptasks.declare.compiler.linux.arm7" if="isLinuxARM7">
- <echo message="Linux.arm7" />
- <property name="compiler.cfg.id.base" value="compiler.cfg.linux.arm7" />
- <property name="linker.cfg.id.base" value="linker.cfg.linux.arm7" />
+ <target name="gluegen.cpptasks.declare.compiler.linux.armv7l" if="isLinuxARMv7l">
+ <echo message="Linux.armv7l" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.linux.armv7l" />
+ <property name="linker.cfg.id.base" value="linker.cfg.linux.armv7l" />
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/arm" />
</target>
@@ -929,7 +932,7 @@
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/ia64" />
</target>
- <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.arm7" if="isLinux">
+ <target name="gluegen.cpptasks.declare.compiler.linux" depends="gluegen.cpptasks.declare.compiler.linux.x86,gluegen.cpptasks.declare.compiler.linux.amd64,gluegen.cpptasks.declare.compiler.linux.ia64,gluegen.cpptasks.declare.compiler.linux.armv7l" if="isLinux">
<property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
</target>