Force aligned access for double and int64 on mips*
authorStephane Glondu <steph@glondu.net>
Sat, 28 May 2011 22:00:39 +0000 (00:00 +0200)
committerStephane Glondu <steph@glondu.net>
Sat, 28 May 2011 22:05:14 +0000 (00:05 +0200)
debian/changelog
debian/patches/0013-Force-aligned-access-for-double-and-int64-on-mips.patch [new file with mode: 0644]
debian/patches/series

index 42bd45f21fe37334708b14e5cf26fb5edce6bd1c..c90431cfc11f830d578396c1f63fc3e35023140d 100644 (file)
@@ -1,3 +1,9 @@
+ocaml (3.12.0-7) unstable; urgency=low
+
+  * Force aligned access for double and int64 on mips*
+
+ -- Stéphane Glondu <glondu@debian.org>  Sun, 29 May 2011 00:01:26 +0200
+
 ocaml (3.12.0-6) unstable; urgency=low
 
   * Provide a way to use legacy custom linking (Closes: #627761)
diff --git a/debian/patches/0013-Force-aligned-access-for-double-and-int64-on-mips.patch b/debian/patches/0013-Force-aligned-access-for-double-and-int64-on-mips.patch
new file mode 100644 (file)
index 0000000..35e8097
--- /dev/null
@@ -0,0 +1,35 @@
+From: Stephane Glondu <steph@glondu.net>
+Date: Sat, 28 May 2011 23:55:08 +0200
+Subject: Force aligned access for double and int64 on mips*
+
+Some mips machines accept unaligned accesses, others don't. Therefore,
+do not rely on auto-detection.
+
+Signed-off-by: Stephane Glondu <steph@glondu.net>
+---
+ configure |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 32e8d2e..e03a4b8 100755
+--- a/configure
++++ b/configure
+@@ -434,7 +434,7 @@ esac
+ # Determine alignment constraints
+ case "$host" in
+-  sparc*-*-*|hppa*-*-*|arm*-*-*)
++  sparc*-*-*|hppa*-*-*|arm*-*-*|mips*-*-*)
+     # On Sparc V9 with certain versions of gcc, determination of double
+     # alignment is not reliable (PR#1521), hence force it.
+     # Same goes for hppa.
+@@ -467,7 +467,7 @@ esac
+ if $int64_native; then
+   case "$host" in
+     # PR#5088: autodetection is unreliable on ARM
+-    sparc*-*-*|hppa*-*-*|arm*-*-*)
++    sparc*-*-*|hppa*-*-*|arm*-*-*|mips*-*-*)
+       if test $2 = 8; then
+         echo "64-bit integers can be word-aligned."
+         echo "#undef ARCH_ALIGN_INT64" >> m.h
+-- 
index f37aa5ed3d92055e63598c9c667efe1515cfa9c8..fa726e690f2b84e0fde4db3303540ef497d5b6b9 100644 (file)
@@ -10,3 +10,4 @@
 0010-Avoid-multiple-declarations-in-generated-.c-files-in.patch
 0011-Embed-bytecode-in-C-object-when-using-custom.patch
 0012-Properly-initialize-executable-name-in-caml_startup_.patch
+0013-Force-aligned-access-for-double-and-int64-on-mips.patch