Hi,
I tested the patch that YunQiang had proposed.
Small modifications are needed to apply it on latest debian gluegen2 version
(2.3.2-5).
Adapted patch is attached.
Using mentioned patch I was able to build gluegen2 for mips64el.
It seems that there is no need for any other changes, even my old patch
(add-mips-support.patch) for mips/mipsel is not applied on gluegen2 2.3.2-5,
package builds successfully for mips and mipsel.
I could forward this upstream if needed.
Dejan
--- gluegen2-2.3.2.orig/make/build.xml
+++ gluegen2-2.3.2/make/build.xml
@@ -298,6 +298,30 @@
<property name="linker.cfg.id" value="linker.cfg.linux.mipsel" />
</target>
+ <target name="declare.linux.mipsn32" if="isLinuxMipsn32">
+ <echo message="Linux.mipsn32" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id" value="linker.cfg.linux.mipsn32" />
+ </target>
+
+ <target name="declare.linux.mipsn32el" if="isLinuxMipsn32el">
+ <echo message="Linux.mipsn32el" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id" value="linker.cfg.linux.mipsn32el" />
+ </target>
+
+ <target name="declare.linux.mips64" if="isLinuxMips64">
+ <echo message="Linux.mips64" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id" value="linker.cfg.linux.mips64" />
+ </target>
+
+ <target name="declare.linux.mips64el" if="isLinuxMips64el">
+ <echo message="Linux.mips64el" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id" value="linker.cfg.linux.mips64el" />
+ </target>
+
<target name="declare.linux.ppc" if="isLinuxPpc">
<echo message="Linux.ppc" />
<property name="compiler.cfg.id" value="compiler.cfg.linux" />
@@ -340,7 +364,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.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.aarch64,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
+ <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.alpha,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.mipsn32,declare.linux.mipsn32el,declare.linux.mips64,declare.linux.mips64el,declare.linux.ppc,declare.linux.ppc64,declare.linux.ppc64le,declare.linux.aarch64,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" >
<property name="c.src.dir.os" value="unix" />
</target>
--- gluegen2-2.3.2.orig/make/gluegen-cpptasks-base.xml
+++ gluegen2-2.3.2/make/gluegen-cpptasks-base.xml
@@ -47,6 +47,10 @@
- isLinuxHppa
- isLinuxMips
- isLinuxMipsel
+ - isLinuxMipsn32
+ - isLinuxMipsn32el
+ - isLinuxMips64
+ - isLinuxMipsn64el
- isLinuxPpc
- isLinuxPpc64
- isLinuxPpc64le
@@ -135,6 +139,10 @@
- compiler.cfg.linux.hppa
- compiler.cfg.linux.mips
- compiler.cfg.linux.mipsel
+ - compiler.cfg.linux.mipsn32
+ - compiler.cfg.linux.mipsn32el
+ - compiler.cfg.linux.mips64
+ - compiler.cfg.linux.mips64el
- compiler.cfg.linux.ppc
- compiler.cfg.linux.ppc64
- compiler.cfg.linux.ppc64le
@@ -160,6 +168,10 @@
- linker.cfg.linux.hppa
- linker.cfg.linux.mips
- linker.cfg.linux.mipsel
+ - linker.cfg.linux.mipsn32
+ - linker.cfg.linux.mipsn32el
+ - linker.cfg.linux.mips64
+ - linker.cfg.linux.mips64el
- linker.cfg.linux.ppc
- linker.cfg.linux.ppc64le
- linker.cfg.linux.s390
@@ -420,6 +432,42 @@
<condition property="mipsel">
<os arch="mipsel" />
</condition>
+ <condition property="isLinuxMipsn32">
+ <and>
+ <istrue value="${isLinux}" />
+ <os arch="mipsn32" />
+ </and>
+ </condition>
+ <condition property="mipsn32">
+ <os arch="mipsn32" />
+ </condition>
+ <condition property="isLinuxMipsn32el">
+ <and>
+ <istrue value="${isLinux}" />
+ <os arch="mipsn32el" />
+ </and>
+ </condition>
+ <condition property="mipsn32el">
+ <os arch="mipsn32el" />
+ </condition>
+ <condition property="isLinuxMips64">
+ <and>
+ <istrue value="${isLinux}" />
+ <os arch="mips64" />
+ </and>
+ </condition>
+ <condition property="mips64">
+ <os arch="mips64" />
+ </condition>
+ <condition property="isLinuxMips64el">
+ <and>
+ <istrue value="${isLinux}" />
+ <os arch="mips64el" />
+ </and>
+ </condition>
+ <condition property="mips64el">
+ <os arch="mips64el" />
+ </condition>
<condition property="isLinuxPpc">
<and>
<istrue value="${isLinux}" />
@@ -639,6 +687,10 @@
<echo message="LinuxHppa=${isLinuxHppa}" />
<echo message="LinuxMips=${isLinuxMips}" />
<echo message="LinuxMipsel=${isLinuxMipsel}" />
+ <echo message="LinuxMips=${isLinuxMipsn32}" />
+ <echo message="LinuxMipsel=${isLinuxMipsn32el}" />
+ <echo message="LinuxMips=${isLinuxMips64}" />
+ <echo message="LinuxMipsel=${isLinuxMips64el}" />
<echo message="LinuxPpc=${isLinuxPpc}" />
<echo message="LinuxPpc64=${isLinuxPpc64}" />
<echo message="LinuxPpc64le=${isLinuxPpc64le}" />
@@ -721,6 +773,22 @@
<property name="os.and.arch" value="linux-mipsel" />
</target>
+ <target name="gluegen.cpptasks.detect.os.linux.mipsn32" unless="gluegen.cpptasks.detected.os.2" if="isLinuxMipsn32">
+ <property name="os.and.arch" value="linux-mipsn32" />
+ </target>
+
+ <target name="gluegen.cpptasks.detect.os.linux.mipsn32el" unless="gluegen.cpptasks.detected.os.2" if="isLinuxMipsn32el">
+ <property name="os.and.arch" value="linux-mipsn32el" />
+ </target>
+
+ <target name="gluegen.cpptasks.detect.os.linux.mips64" unless="gluegen.cpptasks.detected.os.2" if="isLinuxMips64">
+ <property name="os.and.arch" value="linux-mips64" />
+ </target>
+
+ <target name="gluegen.cpptasks.detect.os.linux.mips64el" unless="gluegen.cpptasks.detected.os.2" if="isLinuxMips64el">
+ <property name="os.and.arch" value="linux-mips64el" />
+ </target>
+
<target name="gluegen.cpptasks.detect.os.linux.ppc" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc">
<property name="os.and.arch" value="linux-ppc" />
</target>
@@ -757,7 +825,7 @@
<property name="os.and.arch" value="android-aarch64" />
</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.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" 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.armv6.armel,gluegen.cpptasks.detect.os.linux.armv6.armhf,gluegen.cpptasks.detect.os.android.armv6.armel,gluegen.cpptasks.detect.os.linux.aarch64,gluegen.cpptasks.detect.os.android.armv6.armhf,gluegen.cpptasks.detect.os.android.aarch64,gluegen.cpptasks.detect.os.linux.alpha,gluegen.cpptasks.detect.os.linux.hppa,gluegen.cpptasks.detect.os.linux.mips,gluegen.cpptasks.detect.os.linux.mipsel,gluegen.cpptasks.detect.os.linux.mipsn32,gluegen.cpptasks.detect.os.linux.mipsn32el,gluegen.cpptasks.detect.os.linux.mips64,gluegen.cpptasks.detect.os.linux.mips64el,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.ppc64,gluegen.cpptasks.detect.os.linux.ppc64le,gluegen.cpptasks.detect.os.linux.s390,gluegen.cpptasks.detect.os.linux.s390x,gluegen.cpptasks.detect.os.linux.sparc" 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" />
@@ -1308,6 +1376,18 @@
<linker id="linker.cfg.linux.mipsel" name="${gcc.compat.compiler}">
</linker>
+ <linker id="linker.cfg.linux.mipsn32" name="${gcc.compat.compiler}">
+ </linker>
+
+ <linker id="linker.cfg.linux.mipsn32el" name="${gcc.compat.compiler}">
+ </linker>
+
+ <linker id="linker.cfg.linux.mips64" name="${gcc.compat.compiler}">
+ </linker>
+
+ <linker id="linker.cfg.linux.mips64el" name="${gcc.compat.compiler}">
+ </linker>
+
<linker id="linker.cfg.linux.ppc" name="${gcc.compat.compiler}">
</linker>
@@ -1549,6 +1629,34 @@
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/mipsel" />
</target>
+ <target name="gluegen.cpptasks.declare.compiler.linux.mipsn32" if="isLinuxMipsn32">
+ <echo message="Linux.Mipsn32" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.base" value="linker.cfg.linux" />
+ <property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/mipsn32" />
+ </target>
+
+ <target name="gluegen.cpptasks.declare.compiler.linux.mipsn32el" if="isLinuxMipsn32el">
+ <echo message="Linux.Mipsn32el" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.base" value="linker.cfg.linux" />
+ <property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/mipsn32el" />
+ </target>
+
+ <target name="gluegen.cpptasks.declare.compiler.linux.mips64" if="isLinuxMips64">
+ <echo message="Linux.Mips64" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.base" value="linker.cfg.linux" />
+ <property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/mips64" />
+ </target>
+
+ <target name="gluegen.cpptasks.declare.compiler.linux.mips64el" if="isLinuxMips64el">
+ <echo message="Linux.Mips64el" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
+ <property name="linker.cfg.id.base" value="linker.cfg.linux" />
+ <property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/mips64el" />
+ </target>
+
<target name="gluegen.cpptasks.declare.compiler.linux.ppc" if="isLinuxPpc">
<echo message="Linux.Ppc" />
<property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
@@ -1591,7 +1699,7 @@
<property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/sparc" />
</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.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" 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.armv6,gluegen.cpptasks.declare.compiler.linux.aarch64,gluegen.cpptasks.declare.compiler.linux.alpha,gluegen.cpptasks.declare.compiler.linux.hppa,gluegen.cpptasks.declare.compiler.linux.mips,gluegen.cpptasks.declare.compiler.linux.mipsel,gluegen.cpptasks.declare.compiler.linux.mipsn32,gluegen.cpptasks.declare.compiler.linux.mipsn32el,gluegen.cpptasks.declare.compiler.linux.mips64,gluegen.cpptasks.declare.compiler.linux.mips64el,gluegen.cpptasks.declare.compiler.linux.ppc,gluegen.cpptasks.declare.compiler.linux.ppc64,gluegen.cpptasks.declare.compiler.linux.ppc64le,gluegen.cpptasks.declare.compiler.linux.s390,gluegen.cpptasks.declare.compiler.linux.s390x,gluegen.cpptasks.declare.compiler.linux.sparc" if="isLinux">
<property name="java.includes.dir.platform" value="${java.includes.dir}/x11" />
</target>