[gluegen2] Add support for aarch64/ppc64
Peter Robinson
pbrobinson at fedoraproject.org
Wed Feb 18 17:30:56 UTC 2015
commit 5309186d0bc361011b91c176f229a598496a5bf2
Author: Peter Robinson <pbrobinson at gmail.com>
Date: Wed Feb 18 17:30:28 2015 +0000
Add support for aarch64/ppc64
gluegen2-add-ppc64-aarch64.patch | 187 ++++++++++++++++++++++++++++++++++++++
gluegen2.spec | 7 +-
2 files changed, 193 insertions(+), 1 deletions(-)
---
diff --git a/gluegen2-add-ppc64-aarch64.patch b/gluegen2-add-ppc64-aarch64.patch
new file mode 100644
index 0000000..db7e012
--- /dev/null
+++ b/gluegen2-add-ppc64-aarch64.patch
@@ -0,0 +1,187 @@
+diff --git a/make/build.xml b/make/build.xml
+index b6921b9..8678be1 100644
+--- a/make/build.xml
++++ b/make/build.xml
+@@ -302,6 +302,24 @@
+ <property name="linker.cfg.id" value="linker.cfg.linux.ppc" />
+ </target>
+
++ <target name="declare.linux.ppc64" if="isLinuxPpc64">
++ <echo message="Linux.ppc64" />
++ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
++ <property name="linker.cfg.id" value="linker.cfg.linux.ppc64" />
++ </target>
++
++ <target name="declare.linux.ppc64le" if="isLinuxPpc64le">
++ <echo message="Linux.ppc64le" />
++ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
++ <property name="linker.cfg.id" value="linker.cfg.linux.ppc64le" />
++ </target>
++
++ <target name="declare.linux.aarch64" if="isLinuxAarch64">
++ <echo message="Linux.aarch64" />
++ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
++ <property name="linker.cfg.id" value="linker.cfg.linux.aarch64" />
++ </target>
++
+ <target name="declare.linux.s390" if="isLinuxs390">
+ <echo message="Linux.s390" />
+ <property name="compiler.cfg.id" value="compiler.cfg.linux" />
+@@ -320,7 +338,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" />
+ <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
+ </target>
+diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml
+index c399f6f..713ca93 100755
+--- a/make/gluegen-cpptasks-base.xml
++++ b/make/gluegen-cpptasks-base.xml
+@@ -46,6 +46,9 @@
+ - isLinuxMips
+ - isLinuxMipsel
+ - isLinuxPpc
++ - isLinuxPpc64
++ - isLinuxPpc64le
++ - isLinuxAarch64
+ - isLinuxs390
+ - isLinuxs390x
+ - isLinuxSparc
+@@ -130,6 +133,9 @@
+ - compiler.cfg.linux.mips
+ - compiler.cfg.linux.mipsel
+ - compiler.cfg.linux.ppc
++ - compiler.cfg.linux.ppc64
++ - compiler.cfg.linux.ppc64le
++ - compiler.cfg.linux.aarch64
+ - compiler.cfg.linux.s390
+ - compiler.cfg.linux.s390x
+ - compiler.cfg.linux.sparc
+@@ -391,6 +397,33 @@
+ <condition property="ppc">
+ <os arch="ppc" />
+ </condition>
++ <condition property="isLinuxPpc64">
++ <and>
++ <istrue value="${isLinux}" />
++ <os arch="ppc64" />
++ </and>
++ </condition>
++ <condition property="ppc64">
++ <os arch="ppc64" />
++ </condition>
++ <condition property="isLinuxPpc64le">
++ <and>
++ <istrue value="${isLinux}" />
++ <os arch="ppc64le" />
++ </and>
++ </condition>
++ <condition property="ppc64le">
++ <os arch="ppc64le" />
++ </condition>
++ <condition property="isLinuxAarch64">
++ <and>
++ <istrue value="${isLinux}" />
++ <os arch="aarch64" />
++ </and>
++ </condition>
++ <condition property="aarch64">
++ <os arch="aarch64" />
++ </condition>
+ <condition property="isLinuxs390">
+ <and>
+ <istrue value="${isLinux}" />
+@@ -573,6 +606,9 @@
+ <echo message="LinuxMips=${isLinuxMips}" />
+ <echo message="LinuxMipsel=${isLinuxMipsel}" />
+ <echo message="LinuxPpc=${isLinuxPpc}" />
++ <echo message="LinuxPpc64=${isLinuxPpc64}" />
++ <echo message="LinuxPpc64le=${isLinuxPpc64le}" />
++ <echo message="LinuxAarch64=${isLinuxAarch64}" />
+ <echo message="Linuxs390=${isLinuxs390}" />
+ <echo message="Linuxs390x=${isLinuxs390x}" />
+ <echo message="LinuxSparc=${isLinuxSparc}" />
+@@ -649,6 +685,18 @@
+ <property name="os.and.arch" value="linux-ppc" />
+ </target>
+
++ <target name="gluegen.cpptasks.detect.os.linux.ppc64" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc64">
++ <property name="os.and.arch" value="linux-ppc64" />
++ </target>
++
++ <target name="gluegen.cpptasks.detect.os.linux.ppc64le" unless="gluegen.cpptasks.detected.os.2" if="isLinuxPpc64le">
++ <property name="os.and.arch" value="linux-ppc64le" />
++ </target>
++
++ <target name="gluegen.cpptasks.detect.os.linux.aarch64" unless="gluegen.cpptasks.detected.os.2" if="isLinuxAarch64">
++ <property name="os.and.arch" value="linux-aarch64" />
++ </target>
++
+ <target name="gluegen.cpptasks.detect.os.linux.s390" unless="gluegen.cpptasks.detected.os.2" if="isLinuxs390">
+ <property name="os.and.arch" value="linux-s390" />
+ </target>
+@@ -669,7 +717,7 @@
+ <property name="os.and.arch" value="android-armv6hf" />
+ </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.android.armv6.armhf,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.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.android.armv6.armhf,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.aarch64,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" />
+@@ -1199,6 +1247,15 @@
+ <linker id="linker.cfg.linux.ppc" name="${gcc.compat.compiler}">
+ </linker>
+
++ <linker id="linker.cfg.linux.ppc64" name="${gcc.compat.compiler}">
++ </linker>
++
++ <linker id="linker.cfg.linux.ppc64le" name="${gcc.compat.compiler}">
++ </linker>
++
++ <linker id="linker.cfg.linux.aarch64" name="${gcc.compat.compiler}">
++ </linker>
++
+ <linker id="linker.cfg.linux.s390" name="${gcc.compat.compiler}">
+ </linker>
+
+@@ -1413,6 +1470,27 @@
+ <property name="java.lib.dir.platform" value="${java.home.dir}/jre/lib/ppc" />
+ </target>
+
++ <target name="gluegen.cpptasks.declare.compiler.linux.ppc64" if="isLinuxPpc64">
++ <echo message="Linux.Ppc64" />
++ <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/ppc64" />
++ </target>
++
++ <target name="gluegen.cpptasks.declare.compiler.linux.ppc64le" if="isLinuxPpc64le">
++ <echo message="Linux.Ppc64le" />
++ <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/ppc64le" />
++ </target>
++
++ <target name="gluegen.cpptasks.declare.compiler.linux.aarch64" if="isLinuxAarch64">
++ <echo message="Linux.Aarch64" />
++ <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/aarch64" />
++ </target>
++
+ <target name="gluegen.cpptasks.declare.compiler.linux.s390" if="isLinuxs390">
+ <echo message="Linux.s390" />
+ <property name="compiler.cfg.id.base" value="compiler.cfg.linux" />
+@@ -1434,7 +1512,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.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.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.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.aarch64,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}/linux" />
+ </target>
+
diff --git a/gluegen2.spec b/gluegen2.spec
index 2039a1e..b892fb0 100644
--- a/gluegen2.spec
+++ b/gluegen2.spec
@@ -1,6 +1,6 @@
Name: gluegen2
Version: 2.2.4
-Release: 1%{?dist}
+Release: 2%{?dist}
%global src_name gluegen-v%{version}
Summary: Java/JNI glue code generator to call out to ANSI C
@@ -16,6 +16,7 @@ Patch3: %{name}-0003-disable-executable-tmp-tests.patch
Patch4: %{name}-0004-add-antlr-jar-to-all-targets.patch
Patch5: %{name}-0005-use-system-antlib.patch
Patch6: %{name}-0006-disable-static-libgcc.patch
+Patch7: %{name}-add-ppc64-aarch64.patch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
@@ -86,6 +87,7 @@ sed -e "s|%%{_libdir}|%{_libdir}|;s|%%{name}|%{name}|" %{PATCH2} \
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
# Remove any JNI files
rm -fr make/stub_includes/jni
@@ -229,6 +231,9 @@ rm -fr %{buildroot}%{_jnidir}/test
%{_docdir}/%{name}
%changelog
+* Wed Feb 18 2015 Peter Robinson <pbrobinson at fedoraproject.org> 2.2.4-2
+- Add support for aarch64/ppc64
+
* Tue Sep 09 2014 Clément David <c.david86 at gmail.com> - 2.2.4-1
- Update version
- Disable the use of static-libgcc
More information about the scm-commits
mailing list