summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-12-10 14:11:52 +0100
committerFabian Groffen <grobian@gentoo.org>2018-12-10 14:11:52 +0100
commitd572e261cc14127032df8cf5ed513ca5e1d27590 (patch)
tree6b2f67934ce354728db29805dc14a5d5f755d941 /dev-libs
parentRevert "profiles/default/linux/powerpc/ppc64: unmask USE=dmarc for exim" (diff)
downloadgentoo-d572e261cc14127032df8cf5ed513ca5e1d27590.tar.gz
gentoo-d572e261cc14127032df8cf5ed513ca5e1d27590.tar.bz2
gentoo-d572e261cc14127032df8cf5ed513ca5e1d27590.zip
dev-libs/libffi: fix compilation for ppc-macos
Signed-off-by: Fabian Groffen <grobian@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libffi/files/libffi-3.3_rc0-ppc-macos-go.patch79
-rw-r--r--dev-libs/libffi/libffi-3.3_rc0.ebuild1
2 files changed, 80 insertions, 0 deletions
diff --git a/dev-libs/libffi/files/libffi-3.3_rc0-ppc-macos-go.patch b/dev-libs/libffi/files/libffi-3.3_rc0-ppc-macos-go.patch
new file mode 100644
index 000000000000..88f9b4557657
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.3_rc0-ppc-macos-go.patch
@@ -0,0 +1,79 @@
+ffi_darwin: use FFI_GO_CLOSURES guard to avoid unsolvable dependencies
+
+The go calls depend on compilation and link-time signatures and symbols
+which are missing because they aren't build due to FFO_GO_CLOSURES not
+being set.
+
+Signed-off-by: Fabian Groffen <grobian@gentoo.org>
+
+--- a/src/powerpc/ffi_darwin.c 2018-04-02 14:21:51.000000000 +0200
++++ b/src/powerpc/ffi_darwin.c 2018-12-10 13:57:26.000000000 +0100
+@@ -909,8 +909,10 @@
+ extern void ffi_call_AIX(extended_cif *, long, unsigned, unsigned *,
+ void (*fn)(void), void (*fn2)(void));
+
++#if FFI_GO_CLOSURES
+ extern void ffi_call_go_AIX(extended_cif *, long, unsigned, unsigned *,
+ void (*fn)(void), void (*fn2)(void), void *closure);
++#endif
+
+ extern void ffi_call_DARWIN(extended_cif *, long, unsigned, unsigned *,
+ void (*fn)(void), void (*fn2)(void), ffi_type*);
+@@ -950,6 +952,7 @@
+ }
+ }
+
++#if FFI_GO_CLOSURES
+ void
+ ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
+ void *closure)
+@@ -981,6 +984,7 @@
+ break;
+ }
+ }
++#endif
+
+ static void flush_icache(char *);
+ static void flush_range(char *, int);
+@@ -1110,6 +1114,7 @@
+ return FFI_OK;
+ }
+
++#if FFI_GO_CLOSURES
+ ffi_status
+ ffi_prep_go_closure (ffi_go_closure* closure,
+ ffi_cif* cif,
+@@ -1133,6 +1138,7 @@
+ }
+ return FFI_OK;
+ }
++#endif
+
+ static void
+ flush_icache(char *addr)
+@@ -1168,9 +1174,11 @@
+ ffi_closure_helper_DARWIN (ffi_closure *, void *,
+ unsigned long *, ffi_dblfl *);
+
++#if FFI_GO_CLOSURES
+ ffi_type *
+ ffi_go_closure_helper_DARWIN (ffi_go_closure*, void *,
+ unsigned long *, ffi_dblfl *);
++#endif
+
+ /* Basically the trampoline invokes ffi_closure_ASM, and on
+ entry, r11 holds the address of the closure.
+@@ -1430,6 +1438,7 @@
+ closure->user_data, rvalue, pgr, pfr);
+ }
+
++#if FFI_GO_CLOSURES
+ ffi_type *
+ ffi_go_closure_helper_DARWIN (ffi_go_closure *closure, void *rvalue,
+ unsigned long *pgr, ffi_dblfl *pfr)
+@@ -1437,4 +1446,5 @@
+ return ffi_closure_helper_common (closure->cif, closure->fun,
+ closure, rvalue, pgr, pfr);
+ }
++#endif
+
diff --git a/dev-libs/libffi/libffi-3.3_rc0.ebuild b/dev-libs/libffi/libffi-3.3_rc0.ebuild
index 0a31487e51f1..5f56796bb879 100644
--- a/dev-libs/libffi/libffi-3.3_rc0.ebuild
+++ b/dev-libs/libffi/libffi-3.3_rc0.ebuild
@@ -25,6 +25,7 @@ DOCS="ChangeLog* README.md"
PATCHES=(
"${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044
"${FILESDIR}"/${PN}-3.3_rc0-hppa-no-TEXTREL.patch
+ "${FILESDIR}"/${PN}-3.3_rc0-ppc-macos-go.patch
)
S=${WORKDIR}/${MY_P}