--- ocaml-3.12.1/byterun/signals_machdep.h.orig 2015-03-13 11:34:46.335858998 +0000 +++ ocaml-3.12.1/byterun/signals_machdep.h 2015-03-13 11:12:03.915890556 +0000 @@ -18,7 +18,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(__LP64__))) #define Read_and_clear(dst,src) \ asm("xorl %0, %0; xchgl %0, %1" \ --- ocaml-3.12.1/otherlibs/num/bng.c.orig 2010-05-21 13:00:49.000000000 +0100 +++ ocaml-3.12.1/otherlibs/num/bng.c 2015-03-13 11:18:00.421882298 +0000 @@ -17,7 +17,7 @@ #include "config.h" #if defined(__GNUC__) && BNG_ASM_LEVEL > 0 -#if defined(BNG_ARCH_ia32) +#if defined(BNG_ARCH_ia32) || (defined(BNG_ARCH_amd64) && !defined(__LP64__)) #include "bng_ia32.c" #elif defined(BNG_ARCH_amd64) #include "bng_amd64.c"