1 |
commit: 7e002c40c695e591f8d9ceadaee4c5013e6df256 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 29 12:54:14 2017 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 12:54:28 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e002c40 |
7 |
|
8 |
dev-lang/ghc: apply gentoo dev-libs/libffi patch for alpha |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch | 57 +++++++++++++++++++++++++ |
13 |
dev-lang/ghc/ghc-8.0.2.ebuild | 1 + |
14 |
2 files changed, 58 insertions(+) |
15 |
|
16 |
diff --git a/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch b/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch |
17 |
new file mode 100644 |
18 |
index 00000000..166f7fe |
19 |
--- /dev/null |
20 |
+++ b/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch |
21 |
@@ -0,0 +1,57 @@ |
22 |
+commit 2c220c4b053c8efb2098ee20910084a42a0b2dcd |
23 |
+Author: Sergei Trofimovich <siarheit@××××××.com> |
24 |
+Date: Sun Jan 29 11:59:36 2017 +0000 |
25 |
+ |
26 |
+ libffi: fix build COMPLEX build failure on alpha |
27 |
+ |
28 |
+ libtool: compile: alpha-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude \ |
29 |
+ -I../src -I. -I../include -Iinclude -I../src -Wall -w -mieee -D_REENTRANT -fno-stack-protector \ |
30 |
+ -w -MT src/alpha/osf.lo -MMD -MP -MF src/alpha/.deps/osf.Tpo \ |
31 |
+ -c ../src/alpha/osf.S -fPIC -DPIC -o src/alpha/.libs/osf.o |
32 |
+ |
33 |
+ ../src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h" |
34 |
+ #error "osf.S out of sync with ffi.h" |
35 |
+ ^ |
36 |
+ |
37 |
+ Signed-off-by: Sergei Trofimovich <siarheit@××××××.com> |
38 |
+ |
39 |
+diff --git a/libffi/ghc.mk b/libffi/ghc.mk |
40 |
+index 7c5bc9e1b3..4297ed449e 100644 |
41 |
+--- a/libffi/ghc.mk |
42 |
++++ b/libffi/ghc.mk |
43 |
+@@ -63,6 +63,9 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP) |
44 |
+ # will use cygwin symbolic links which cannot be read by mingw gcc. |
45 |
+ chmod +x libffi/ln |
46 |
+ |
47 |
++ # fix libffi build failure on alpha |
48 |
++ ( cd libffi/build && "$(PATCH_CMD)" -p0 < ../libffi.3.2.1-complex_alpha.diff; ) |
49 |
++ |
50 |
+ # We need to use -MMD rather than -MD, as otherwise we get paths |
51 |
+ # like c:/... in the dependency files on Windows, and the extra |
52 |
+ # colons break make |
53 |
+diff --git a/libffi/libffi.3.2.1-complex_alpha.diff b/libffi/libffi.3.2.1-complex_alpha.diff |
54 |
+new file mode 100644 |
55 |
+index 0000000000..0d6e0bc290 |
56 |
+--- /dev/null |
57 |
++++ b/libffi/libffi.3.2.1-complex_alpha.diff |
58 |
+@@ -0,0 +1,20 @@ |
59 |
++--- src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100 |
60 |
+++++ src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100 |
61 |
++@@ -279,6 +279,7 @@ |
62 |
++ .gprel32 $load_64 # FFI_TYPE_SINT64 |
63 |
++ .gprel32 $load_none # FFI_TYPE_STRUCT |
64 |
++ .gprel32 $load_64 # FFI_TYPE_POINTER |
65 |
+++ .gprel32 $load_none # FFI_TYPE_COMPLEX |
66 |
++ |
67 |
++ /* Assert that the table above is in sync with ffi.h. */ |
68 |
++ |
69 |
++@@ -294,7 +295,8 @@ |
70 |
++ || FFI_TYPE_SINT64 != 12 \ |
71 |
++ || FFI_TYPE_STRUCT != 13 \ |
72 |
++ || FFI_TYPE_POINTER != 14 \ |
73 |
++- || FFI_TYPE_LAST != 14 |
74 |
+++ || FFI_TYPE_COMPLEX != 15 \ |
75 |
+++ || FFI_TYPE_LAST != 15 |
76 |
++ #error "osf.S out of sync with ffi.h" |
77 |
++ #endif |
78 |
++ |
79 |
|
80 |
diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild |
81 |
index 53d6413..e6dc320 100644 |
82 |
--- a/dev-lang/ghc/ghc-8.0.2.ebuild |
83 |
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild |
84 |
@@ -452,6 +452,7 @@ src_prepare() { |
85 |
epatch "${FILESDIR}"/${PN}-8.0.1-ww-args-limit.patch |
86 |
epatch "${FILESDIR}"/${PN}-8.0.1-par-g0-on-A32.patch |
87 |
epatch "${FILESDIR}"/${PN}-8.0.2_rc2-old-sphinx.patch |
88 |
+ epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch |
89 |
|
90 |
if use prefix; then |
91 |
# Make configure find docbook-xsl-stylesheets from Prefix |