summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2017-01-29 12:54:14 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2017-01-29 12:54:28 +0000
commit7e002c40c695e591f8d9ceadaee4c5013e6df256 (patch)
tree21c5db3437f76e015436589a63d207fdc577fe5a /dev-lang/ghc
parentsys-devel/llvm: Remove old doc install code (diff)
downloadgentoo-7e002c40c695e591f8d9ceadaee4c5013e6df256.tar.gz
gentoo-7e002c40c695e591f8d9ceadaee4c5013e6df256.tar.bz2
gentoo-7e002c40c695e591f8d9ceadaee4c5013e6df256.zip
dev-lang/ghc: apply gentoo dev-libs/libffi patch for alpha
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-lang/ghc')
-rw-r--r--dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch57
-rw-r--r--dev-lang/ghc/ghc-8.0.2.ebuild1
2 files changed, 58 insertions, 0 deletions
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
new file mode 100644
index 000000000000..166f7fe42991
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch
@@ -0,0 +1,57 @@
+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
++
diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
index 53d64134a061..e6dc320cb76a 100644
--- a/dev-lang/ghc/ghc-8.0.2.ebuild
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -452,6 +452,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-8.0.1-ww-args-limit.patch
epatch "${FILESDIR}"/${PN}-8.0.1-par-g0-on-A32.patch
epatch "${FILESDIR}"/${PN}-8.0.2_rc2-old-sphinx.patch
+ epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
if use prefix; then
# Make configure find docbook-xsl-stylesheets from Prefix