blob: 166f7fe42991a69a4a57c7743be32ea6cd8d6ae8 [file] [log] [blame]
commit 2c220c4b053c8efb2098ee20910084a42a0b2dcd
Author: Sergei Trofimovich <siarheit@google.com>
Date: Sun Jan 29 11:59:36 2017 +0000
libffi: fix build COMPLEX build failure on alpha
libtool: compile: alpha-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude \
-I../src -I. -I../include -Iinclude -I../src -Wall -w -mieee -D_REENTRANT -fno-stack-protector \
-w -MT src/alpha/osf.lo -MMD -MP -MF src/alpha/.deps/osf.Tpo \
-c ../src/alpha/osf.S -fPIC -DPIC -o src/alpha/.libs/osf.o
../src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h"
#error "osf.S out of sync with ffi.h"
^
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index 7c5bc9e1b3..4297ed449e 100644
--- a/libffi/ghc.mk
+++ b/libffi/ghc.mk
@@ -63,6 +63,9 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
# will use cygwin symbolic links which cannot be read by mingw gcc.
chmod +x libffi/ln
+ # fix libffi build failure on alpha
+ ( cd libffi/build && "$(PATCH_CMD)" -p0 < ../libffi.3.2.1-complex_alpha.diff; )
+
# We need to use -MMD rather than -MD, as otherwise we get paths
# like c:/... in the dependency files on Windows, and the extra
# colons break make
diff --git a/libffi/libffi.3.2.1-complex_alpha.diff b/libffi/libffi.3.2.1-complex_alpha.diff
new file mode 100644
index 0000000000..0d6e0bc290
--- /dev/null
+++ b/libffi/libffi.3.2.1-complex_alpha.diff
@@ -0,0 +1,20 @@
+--- src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100
++++ src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100
+@@ -279,6 +279,7 @@
+ .gprel32 $load_64 # FFI_TYPE_SINT64
+ .gprel32 $load_none # FFI_TYPE_STRUCT
+ .gprel32 $load_64 # FFI_TYPE_POINTER
++ .gprel32 $load_none # FFI_TYPE_COMPLEX
+
+ /* Assert that the table above is in sync with ffi.h. */
+
+@@ -294,7 +295,8 @@
+ || FFI_TYPE_SINT64 != 12 \
+ || FFI_TYPE_STRUCT != 13 \
+ || FFI_TYPE_POINTER != 14 \
+- || FFI_TYPE_LAST != 14
++ || FFI_TYPE_COMPLEX != 15 \
++ || FFI_TYPE_LAST != 15
+ #error "osf.S out of sync with ffi.h"
+ #endif
+