1 |
commit: 75b2c980d16c2b137f21e9f6a0a3f1de6ddd7769 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 14 19:51:14 2017 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 14 19:56:54 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75b2c980 |
7 |
|
8 |
dev-libs/libffi: ia64: fix small struct handling, bug #634190 |
9 |
|
10 |
After FFI_TYPE_COMPLEX was added to libffi ia64 dispatch table |
11 |
was off-by-one in IA-64 specific handling of return values. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/634190 |
14 |
Package-Manager: Portage-2.3.10, Repoman-2.3.3 |
15 |
|
16 |
.../libffi/files/libffi-3.2.1-complex-ia64.patch | 41 ++++++++++++++++++++++ |
17 |
dev-libs/libffi/libffi-3.2.1.ebuild | 1 + |
18 |
2 files changed, 42 insertions(+) |
19 |
|
20 |
diff --git a/dev-libs/libffi/files/libffi-3.2.1-complex-ia64.patch b/dev-libs/libffi/files/libffi-3.2.1-complex-ia64.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..fd5c1ea4b28 |
23 |
--- /dev/null |
24 |
+++ b/dev-libs/libffi/files/libffi-3.2.1-complex-ia64.patch |
25 |
@@ -0,0 +1,41 @@ |
26 |
+ia64: fix small struct handling (missing complex type entry) |
27 |
+ |
28 |
+commit 6e8a4460833594d5af1b4539178025da0077df19 |
29 |
+added FFI_TYPE_COMPLEX value type (comes after FFI_TYPE_POINTER) |
30 |
+ |
31 |
+ia64 ffi_closure_unix reiles on the ordering of |
32 |
+types as ia64 has ia64-specific FFI types: |
33 |
+small struct and others. |
34 |
+ |
35 |
+As a result all tests handling small structs broke. |
36 |
+ |
37 |
+The change fixes dispatch table by ignoring FFI_TYPE_COMPLEX. |
38 |
+This has positive effect of unbreaking most tests: |
39 |
+ |
40 |
+ === libffi Summary === |
41 |
+ |
42 |
+-# of expected passes 1595 |
43 |
+-# of unexpected failures 295 |
44 |
++# of expected passes 1930 |
45 |
++# of unexpected failures 10 |
46 |
+ # of unsupported tests 30 |
47 |
+ |
48 |
+Bug: https://bugs.gentoo.org/634190 |
49 |
+--- a/src/ia64/unix.S |
50 |
++++ b/src/ia64/unix.S |
51 |
+@@ -529,6 +529,7 @@ ffi_closure_unix: |
52 |
+ data8 @pcrel(.Lst_int64) // FFI_TYPE_SINT64 |
53 |
+ data8 @pcrel(.Lst_void) // FFI_TYPE_STRUCT |
54 |
+ data8 @pcrel(.Lst_int64) // FFI_TYPE_POINTER |
55 |
++ data8 @pcrel(.Lst_void) // FFI_TYPE_COMPLEX (not implemented) |
56 |
+ data8 @pcrel(.Lst_small_struct) // FFI_IA64_TYPE_SMALL_STRUCT |
57 |
+ data8 @pcrel(.Lst_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT |
58 |
+ data8 @pcrel(.Lst_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE |
59 |
+@@ -550,6 +551,7 @@ ffi_closure_unix: |
60 |
+ data8 @pcrel(.Lld_int) // FFI_TYPE_SINT64 |
61 |
+ data8 @pcrel(.Lld_void) // FFI_TYPE_STRUCT |
62 |
+ data8 @pcrel(.Lld_int) // FFI_TYPE_POINTER |
63 |
++ data8 @pcrel(.Lld_void) // FFI_TYPE_COMPLEX (not implemented) |
64 |
+ data8 @pcrel(.Lld_small_struct) // FFI_IA64_TYPE_SMALL_STRUCT |
65 |
+ data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT |
66 |
+ data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE |
67 |
|
68 |
diff --git a/dev-libs/libffi/libffi-3.2.1.ebuild b/dev-libs/libffi/libffi-3.2.1.ebuild |
69 |
index 1160d49a6b8..848a9fedbf1 100644 |
70 |
--- a/dev-libs/libffi/libffi-3.2.1.ebuild |
71 |
+++ b/dev-libs/libffi/libffi-3.2.1.ebuild |
72 |
@@ -40,6 +40,7 @@ src_prepare() { |
73 |
epatch "${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044 |
74 |
epatch "${FILESDIR}"/${PN}-3.2.1-complex_alpha.patch |
75 |
epatch "${FILESDIR}"/${PN}-3.1-darwin-x32.patch |
76 |
+ epatch "${FILESDIR}"/${PN}-3.2.1-complex-ia64.patch |
77 |
epatch_user |
78 |
elibtoolize |
79 |
} |