Compatibility with x32 architecture
authorStephane Glondu <steph@glondu.net>
Tue, 16 Feb 2016 10:29:16 +0000 (11:29 +0100)
committerStéphane Glondu <glondu@debian.org>
Thu, 13 Jul 2017 02:40:57 +0000 (03:40 +0100)
Origin: https://github.com/ocaml/ocaml/commit/58c07fa89ec6546cea911f1d2e7803fd7aa75de9
Bug: http://caml.inria.fr/mantis/view.php?id=6722
Bug-Debian: https://bugs.debian.org/773409

Gbp-Pq: Name 0011-Compatibility-with-x32-architecture.patch

byterun/caml/signals_machdep.h
configure

index 4987e2f6a80544ef44452d1b54bae283a6525c0d..ce6bd2e248c9fecc6cdea0f75a7acfa320579491 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef CAML_SIGNALS_MACHDEP_H
 #define CAML_SIGNALS_MACHDEP_H
 
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && (defined(__i386__) || (defined(__x86_64__) && defined(__ILP32__)))
 
 #define Read_and_clear(dst,src) \
   asm("xorl %0, %0; xchgl %0, %1" \
index dfcb84904bd5ff7edd7105cbb35eff2308e0e248..c37a2e5234176d293fdbcebfaf68f06f05757492 100755 (executable)
--- a/configure
+++ b/configure
@@ -874,14 +874,13 @@ esac
 
 # Some platforms exist both in 32-bit and 64-bit variants, not distinguished
 # by $target.  Turn off native code compilation on platforms where 64-bit mode
-# is not supported.  (PR#4441)
+# is not supported  (PR#4441).
+# Sometimes, it's 32-bit mode that is not supported  (PR#6722).
 
-if $arch64; then
-  case "$arch,$model" in
-    sparc,default|power,ppc)
+case "$arch64,$arch,$model" in
+  true,sparc,*|true,power,ppc|false,amd64,*)
       arch=none; model=default; system=unknown;;
-  esac
-fi
+esac
 
 if test -z "$ccoption"; then
   nativecc="$bytecc"