forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ghc-8.0.2-libffi-alpha.patch
57 lines (51 loc) · 2.08 KB
/
ghc-8.0.2-libffi-alpha.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
commit 2c220c4b053c8efb2098ee20910084a42a0b2dcd
Author: Sergei Trofimovich <[email protected]>
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 <[email protected]>
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
+