1 |
commit: ee2c3dee59595741c93f694357308368f4dfea19 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 28 00:13:27 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 28 00:16:16 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee2c3dee |
7 |
|
8 |
dev-libs/libffi: fix build on ppc32 |
9 |
|
10 |
Reported-by: qmpcggv2ei0p <AT> opayq.com |
11 |
Closes: https://bugs.gentoo.org/701128 |
12 |
Package-Manager: Portage-2.3.79, Repoman-2.3.18 |
13 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
14 |
|
15 |
dev-libs/libffi/files/libffi-3.3-power7.patch | 39 +++++++++++++++++++++++++++ |
16 |
dev-libs/libffi/libffi-3.3-r1.ebuild | 1 + |
17 |
2 files changed, 40 insertions(+) |
18 |
|
19 |
diff --git a/dev-libs/libffi/files/libffi-3.3-power7.patch b/dev-libs/libffi/files/libffi-3.3-power7.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..83f518f4c2e |
22 |
--- /dev/null |
23 |
+++ b/dev-libs/libffi/files/libffi-3.3-power7.patch |
24 |
@@ -0,0 +1,39 @@ |
25 |
+https://bugs.gentoo.org/701128 |
26 |
+ |
27 |
+From 2138adb2a5b6a0bc2fe3518e0645eacc89b6f392 Mon Sep 17 00:00:00 2001 |
28 |
+From: Sergei Trofimovich <slyfox@g.o> |
29 |
+Date: Thu, 28 Nov 2019 00:02:42 +0000 |
30 |
+Subject: [PATCH] powerpc: fix build failure on power7 and older |
31 |
+ |
32 |
+Build failure looks as: |
33 |
+``` |
34 |
+libtool: compile: powerpc-unknown-linux-gnu-gcc \ |
35 |
+ -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ... |
36 |
+In file included from src/powerpc/ffi.c:33: |
37 |
+src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target |
38 |
+ 65 | typedef __int128 float128; |
39 |
+ | ^~~~~~~~ |
40 |
+``` |
41 |
+ |
42 |
+The fix avoids using __int128 in favour of aligned char[16]. |
43 |
+ |
44 |
+Closes: https://github.com/libffi/libffi/issues/531 |
45 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
46 |
+--- |
47 |
+ src/powerpc/ffi_powerpc.h | 2 +- |
48 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
49 |
+ |
50 |
+--- a/src/powerpc/ffi_powerpc.h |
51 |
++++ b/src/powerpc/ffi_powerpc.h |
52 |
+@@ -62,7 +62,7 @@ typedef _Float128 float128; |
53 |
+ #elif defined(__FLOAT128__) |
54 |
+ typedef __float128 float128; |
55 |
+ #else |
56 |
+-typedef __int128 float128; |
57 |
++typedef char float128[16] __attribute__((aligned(16))); |
58 |
+ #endif |
59 |
+ |
60 |
+ void FFI_HIDDEN ffi_closure_SYSV (void); |
61 |
+-- |
62 |
+2.24.0 |
63 |
+ |
64 |
|
65 |
diff --git a/dev-libs/libffi/libffi-3.3-r1.ebuild b/dev-libs/libffi/libffi-3.3-r1.ebuild |
66 |
index 53912670ba1..2377c795636 100644 |
67 |
--- a/dev-libs/libffi/libffi-3.3-r1.ebuild |
68 |
+++ b/dev-libs/libffi/libffi-3.3-r1.ebuild |
69 |
@@ -27,6 +27,7 @@ DOCS="ChangeLog* README.md" |
70 |
PATCHES=( |
71 |
"${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044 |
72 |
"${FILESDIR}"/${PN}-3.3_rc0-ppc-macos-go.patch |
73 |
+ "${FILESDIR}"/${PN}-3.3-power7.patch |
74 |
) |
75 |
|
76 |
S=${WORKDIR}/${MY_P} |