[gluegen2] 02/06: Ppc64el runtime support

Gilles Filippini pini at debian.org
Sat Oct 10 22:42:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

pini pushed a commit to branch master
in repository gluegen2.

commit 24c63b441e905f43ce12efd8197305f45276d8f5
Author: Gilles Filippini <pini at debian.org>
Date:   Sat Oct 10 01:58:22 2015 +0000

    Ppc64el runtime support
    
    New patch ppc64el-support.diff with build and runtime support for
    ppc64el. It supersedes fix-ppc64-build-config.patch which was
    build-time only.
    Another new patch fix-arm64-build-config.diff gathers some aarch64
    snippets previously in fix-ppc64-build-config.patch.
---
 debian/patches/fix-arm64-build-config.diff         |  70 +++++++
 ...c64-build-config.patch => ppc64el-support.diff} | 202 +++++++++++++++------
 debian/patches/series                              |   4 +-
 3 files changed, 219 insertions(+), 57 deletions(-)

diff --git a/debian/patches/fix-arm64-build-config.diff b/debian/patches/fix-arm64-build-config.diff
new file mode 100644
index 0000000..975f86c
--- /dev/null
+++ b/debian/patches/fix-arm64-build-config.diff
@@ -0,0 +1,70 @@
+Index: gluegen2/make/build.xml
+===================================================================
+--- gluegen2.orig/make/build.xml
++++ gluegen2/make/build.xml
+@@ -317,6 +317,12 @@
+       <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" /> 
+@@ -335,7 +341,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.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.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" />
+       <property name="java.includes.dir.platform"           value="${java.includes.dir}/linux" />
+     </target>
+Index: gluegen2/make/gluegen-cpptasks-base.xml
+===================================================================
+--- gluegen2.orig/make/gluegen-cpptasks-base.xml
++++ gluegen2/make/gluegen-cpptasks-base.xml
+@@ -50,6 +50,7 @@
+    -   isLinuxPpc
+    -   isLinuxPpc64
+    -   isLinuxPpc64le
++   -   isLinuxAarch64
+    -   isLinuxs390
+    -   isLinuxs390x
+    -   isLinuxSparc
+@@ -137,6 +138,7 @@
+    -   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
+@@ -440,6 +442,15 @@
+     <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}" />
+@@ -626,6 +637,7 @@
+     <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}" />
diff --git a/debian/patches/fix-ppc64-build-config.patch b/debian/patches/ppc64el-support.diff
similarity index 60%
rename from debian/patches/fix-ppc64-build-config.patch
rename to debian/patches/ppc64el-support.diff
index 33e8cdb..3b5140c 100644
--- a/debian/patches/fix-ppc64-build-config.patch
+++ b/debian/patches/ppc64el-support.diff
@@ -1,62 +1,63 @@
---- a/make/build.xml
-+++ b/make/build.xml
-@@ -305,6 +305,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>
+Index: gluegen2/make/scripts/make.gluegen.all.linux-ppc64le.sh
+===================================================================
+--- /dev/null
++++ gluegen2/make/scripts/make.gluegen.all.linux-ppc64le.sh
+@@ -0,0 +1,24 @@
++#! /bin/sh
 +
-+    <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>
++#    -Dc.compiler.debug=true \
++#    -Dgluegen.cpptasks.detected.os=true \
++#    -DisUnix=true \
++#    -DisLinux=true \
++#    -DisLinuxX86=true \
++#    -DisX11=true \
 +
-+    <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>
++MACHINE=ppc64le
++ARCH=ppc64el
++TRIPLET=powerpc64le-linux-gnu
 +
-     <target name="declare.linux.s390" if="isLinuxs390">
-       <echo message="Linux.s390" />
-       <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
-@@ -323,7 +341,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.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.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" />
-       <property name="java.includes.dir.platform"           value="${java.includes.dir}/linux" />
-     </target>
---- a/make/gluegen-cpptasks-base.xml
-+++ b/make/gluegen-cpptasks-base.xml
-@@ -48,6 +48,9 @@
++export TARGET_PLATFORM_LIBS=/usr/lib/$TRIPLET
++export TARGET_JAVA_LIBS=/usr/lib/jvm/java-7-openjdk-$ARCH/jre/lib/$MACHINE
++
++export GLUEGEN_CPPTASKS_FILE="lib/gluegen-cpptasks-linux-$MACHINE.xml"
++
++#export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"
++export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet"
++
++ant \
++    -Drootrel.build=build-linux-$MACHINE \
++    $* 2>&1 | tee make.gluegen.all.linux-$MACHINE.log
+Index: gluegen2/make/gluegen-cpptasks-base.xml
+===================================================================
+--- gluegen2.orig/make/gluegen-cpptasks-base.xml
++++ gluegen2/make/gluegen-cpptasks-base.xml
+@@ -48,6 +48,8 @@
     -   isLinuxMips
     -   isLinuxMipsel
     -   isLinuxPpc
 +   -   isLinuxPpc64
 +   -   isLinuxPpc64le
-+   -   isLinuxAarch64
     -   isLinuxs390
     -   isLinuxs390x
     -   isLinuxSparc
-@@ -133,6 +136,9 @@
+@@ -133,6 +135,8 @@
     -   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
-@@ -417,6 +423,33 @@
+@@ -155,6 +159,7 @@
+    -   linker.cfg.linux.mips
+    -   linker.cfg.linux.mipsel
+    -   linker.cfg.linux.ppc
++   -   linker.cfg.linux.ppc64le
+    -   linker.cfg.linux.s390
+    -   linker.cfg.linux.s390x
+    -   linker.cfg.linux.sparc
+@@ -417,6 +422,24 @@
      <condition property="ppc">
        <os arch="ppc" />
      </condition>
@@ -78,29 +79,19 @@
 +    <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}" />
-@@ -601,6 +634,9 @@
+@@ -601,6 +624,8 @@
      <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}" />
-@@ -683,6 +719,14 @@
+@@ -683,6 +708,14 @@
      <property name="os.and.arch" value="linux-ppc" />
    </target>
  
@@ -115,7 +106,7 @@
    <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>
-@@ -707,7 +755,7 @@
+@@ -707,7 +740,7 @@
      <property name="os.and.arch" value="android-aarch64" />
    </target>
  
@@ -124,7 +115,7 @@
  
    <target name="gluegen.cpptasks.detect.os.osx" unless="gluegen.cpptasks.detected.os.2" if="isOSX">
      <property name="native.library.suffix"     value="*lib" />
-@@ -1271,6 +1319,12 @@
+@@ -1271,6 +1304,12 @@
      <linker id="linker.cfg.linux.ppc" name="${gcc.compat.compiler}">
      </linker>
  
@@ -137,7 +128,7 @@
      <linker id="linker.cfg.linux.s390" name="${gcc.compat.compiler}">
      </linker>
  
-@@ -1502,6 +1559,20 @@
+@@ -1502,6 +1541,20 @@
        <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/ppc" />
      </target>
  
@@ -158,7 +149,7 @@
      <target name="gluegen.cpptasks.declare.compiler.linux.s390" if="isLinuxs390">
        <echo message="Linux.s390" />
        <property name="compiler.cfg.id.base"          value="compiler.cfg.linux" /> 
-@@ -1523,7 +1601,7 @@
+@@ -1523,7 +1576,7 @@
        <property name="java.lib.dir.platform"         value="${java.home.dir}/jre/lib/sparc" />
      </target>
  
@@ -167,3 +158,102 @@
          <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" />
      </target>
  
+Index: gluegen2/src/java/jogamp/common/os/PlatformPropsImpl.java
+===================================================================
+--- gluegen2.orig/src/java/jogamp/common/os/PlatformPropsImpl.java
++++ gluegen2/src/java/jogamp/common/os/PlatformPropsImpl.java
+@@ -516,6 +516,7 @@ public abstract class PlatformPropsImpl
+      *   <li>linux-aarch64</li>
+      *   <li>linux-amd64</li>
+      *   <li>linux-ppc64</li>
++     *   <li>linux-ppc64le</li>
+      *   <li>linux-mips64</li>
+      *   <li>linux-ia64</li>
+      *   <li>linux-sparcv9</li>
+@@ -572,7 +573,7 @@ public abstract class PlatformPropsImpl
+                 _and_arch_tmp = "amd64";
+                 break;
+             case PPC64:
+-                _and_arch_tmp = "ppc64";
++                _and_arch_tmp = littleEndian ? "ppc64le" : "ppc64";
+                 break;
+             case MIPS_64:
+                 _and_arch_tmp = "mips64";
+Index: gluegen2/src/java/com/jogamp/common/os/MachineDataInfo.java
+===================================================================
+--- gluegen2.orig/src/java/com/jogamp/common/os/MachineDataInfo.java
++++ gluegen2/src/java/com/jogamp/common/os/MachineDataInfo.java
+@@ -63,6 +63,7 @@ public class MachineDataInfo {
+   private final static int[] size_sparc_32_sunos  =  { 4,    4,     4,     8,     16,    4,   8192 };
+   private final static int[] size_x86_32_windows  =  { 4,    4,     4,     8,     12,    4,   4096 };
+   private final static int[] size_lp64_unix       =  { 4,    8,     4,     8,     16,    8,   4096 };
++  private final static int[] size_ppc_64_unix     =  { 4,    8,     4,     8,     16,    8,  65536 };
+   private final static int[] size_x86_64_windows  =  { 4,    4,     4,     8,     16,    8,   4096 };
+ 
+   /*                               arch   os          i8, i16, i32, i64, int, long, float, doubl, ldoubl, ptr */
+@@ -106,8 +107,10 @@ public class MachineDataInfo {
+       SPARC_32_SUNOS( size_sparc_32_sunos, align_sparc_32_sunos),
+       /** {@link Platform.CPUType#X86_32} Windows */
+       X86_32_WINDOWS( size_x86_32_windows, align_x86_32_windows),
+-      /** LP64 Unix, e.g.: {@link Platform.CPUType#X86_64} Unix, {@link Platform.CPUType#ARM64} EABI, {@link Platform.CPUType#PPC64} Unix, .. */
++      /** LP64 Unix, e.g.: {@link Platform.CPUType#X86_64} Unix, {@link Platform.CPUType#ARM64} EABI, .. */
+       LP64_UNIX(      size_lp64_unix,    align_lp64_unix),
++      /** {@link Platform.CPUType#PPC64} Unix */
++      PPC_64_UNIX(      size_ppc_64_unix,    align_lp64_unix),
+       /** {@link Platform.CPUType#X86_64} Windows */
+       X86_64_WINDOWS( size_x86_64_windows, align_x86_64_windows);
+       // 8
+@@ -332,7 +335,7 @@ public class MachineDataInfo {
+              doubleSizeInBytes == md.doubleSizeInBytes &&
+              ldoubleSizeInBytes == md.ldoubleSizeInBytes &&
+              pointerSizeInBytes == md.pointerSizeInBytes &&
+-
++             pageSizeInBytes == md.pageSizeInBytes &&
+              int8AlignmentInBytes == md.int8AlignmentInBytes &&
+              int16AlignmentInBytes == md.int16AlignmentInBytes &&
+              int32AlignmentInBytes == md.int32AlignmentInBytes &&
+Index: gluegen2/src/java/jogamp/common/os/MachineDataInfoRuntime.java
+===================================================================
+--- gluegen2.orig/src/java/jogamp/common/os/MachineDataInfoRuntime.java
++++ gluegen2/src/java/jogamp/common/os/MachineDataInfoRuntime.java
+@@ -112,6 +112,8 @@ public class MachineDataInfoRuntime {
+       } else {
+           if( osType == Platform.OSType.WINDOWS ) {
+               return StaticConfig.X86_64_WINDOWS;
++          } else if ( Platform.CPUType.PPC64 == cpuType ) {
++              return StaticConfig.PPC_64_UNIX;
+           } else {
+               // for all 64bit unix types (x86_64, aarch64, sparcv9, ..)
+               return StaticConfig.LP64_UNIX;
+Index: gluegen2/make/build.xml
+===================================================================
+--- gluegen2.orig/make/build.xml
++++ gluegen2/make/build.xml
+@@ -305,6 +305,18 @@
+       <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.s390" if="isLinuxs390">
+       <echo message="Linux.s390" />
+       <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
+@@ -323,7 +335,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.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.ppc,declare.linux.ppc64,declare.linux.ppc64le,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" />
+       <property name="java.includes.dir.platform"           value="${java.includes.dir}/linux" />
+     </target>
diff --git a/debian/patches/series b/debian/patches/series
index 7e16109..0d53c06 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,6 +16,8 @@ hideException.diff
 #disable_android2.diff
 armhf.diff
 fix-alpha-build-config.patch
-fix-ppc64-build-config.patch
 missing-arch-symbol.diff
 #add-mips-support.patch
+
+ppc64el-support.diff
+fix-arm64-build-config.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/gluegen2.git



More information about the pkg-java-commits mailing list