[polyml] 01/09: Add support for 64-bit SPARC

James Clarke jrtc27-guest at moszumanska.debian.org
Thu Apr 7 10:52:23 UTC 2016


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

jrtc27-guest pushed a commit to branch master
in repository polyml.

commit 1e529d9e1ecd0417d8b6275c7ff454ceb6dd4368
Author: James Clarke <jrtc27 at jrtc27.com>
Date:   Tue Mar 29 17:14:53 2016 +0100

    Add support for 64-bit SPARC
---
 debian/changelog            |  1 +
 debian/patches/series       |  1 +
 debian/patches/sparc64.diff | 46 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 48 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 78df146..4698e73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ polyml (5.6-4) UNRELEASED; urgency=low
 
   * New patches:
     - maxhostnamelen.diff: Remove all use of MAXHOSTNAMELEN
+    - sparc64.diff: Add support for sparc64
 
  -- James Clarke <jrtc27 at jrtc27.com>  Mon, 14 Mar 2016 18:39:58 +0000
 
diff --git a/debian/patches/series b/debian/patches/series
index ce71340..3ed8198 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@ source-date-epoch.diff
 bss-ioarea.diff
 noflsh-unsigned.diff
 maxhostnamelen.diff
+sparc64.diff
diff --git a/debian/patches/sparc64.diff b/debian/patches/sparc64.diff
new file mode 100644
index 0000000..adf660e
--- /dev/null
+++ b/debian/patches/sparc64.diff
@@ -0,0 +1,46 @@
+Description: Add support for 64-bit SPARC
+Author: James Clarke <jrtc27 at jrtc27.com>
+Forwarded: https://github.com/polyml/polyml/pull/25
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/config.h.in
++++ b/config.h.in
+@@ -593,6 +593,9 @@
+ /* Define if the host is a Sparc (32-bit) */
+ #undef HOSTARCHITECTURE_SPARC
+ 
++/* Define if the host is a Sparc (64-bit) */
++#undef HOSTARCHITECTURE_SPARC64
++
+ /* Define if the host is an X86 (32-bit ABI, 64-bit processor) */
+ #undef HOSTARCHITECTURE_X32
+ 
+--- a/configure.ac
++++ b/configure.ac
+@@ -435,6 +435,10 @@
+                 polyarch=interpret
+             fi
+             ;;
++      sparc64*)
++            AC_DEFINE([HOSTARCHITECTURE_SPARC64], [1], [Define if the host is a Sparc (64-bit)])
++            polyarch=interpret
++            ;;
+       sparc*)
+             AC_DEFINE([HOSTARCHITECTURE_SPARC], [1], [Define if the host is a Sparc (32-bit)])
+             polyarch=interpret
+--- a/libpolyml/elfexport.cpp
++++ b/libpolyml/elfexport.cpp
+@@ -398,6 +398,13 @@
+        though, it adds the value in the location being relocated (as with ELF32_Rel
+        relocations) as well as the addend. To be safe, whenever we use an ELF32_Rela
+        relocation we always zero the location to be relocated. */
++#elif defined(HOSTARCHITECTURE_SPARC64)
++    fhdr.e_machine = EM_SPARCV9;
++    directReloc = R_SPARC_64;
++    /* Use the most relaxed memory model. At link time, the most restrictive one is
++       chosen, so it does no harm to be as permissive as possible here. */
++    fhdr.e_flags = EF_SPARCV9_RMO;
++    useRela = true;
+ #elif defined(HOSTARCHITECTURE_X86_64)
+     /* It seems Solaris/X86-64 only supports ELF64_Rela relocations.  It appears that
+        Linux will support either so we now use Rela on X86-64. */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/polyml.git



More information about the debian-science-commits mailing list