1 |
commit: e01ced2da69c0d913e4c91467a0ca5fc3615edcd |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 14 02:51:24 2017 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 14 02:51:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e01ced2d |
7 |
|
8 |
sys-libs/libunwind: fix build errors on hppa/ia64/ppc/ppc64 #586092 |
9 |
|
10 |
.../libunwind/files/libunwind-1.2-coredump-regs.patch | 16 ++++++++++++++++ |
11 |
sys-libs/libunwind/libunwind-1.2.ebuild | 2 ++ |
12 |
2 files changed, 18 insertions(+) |
13 |
|
14 |
diff --git a/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch b/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch |
15 |
new file mode 100644 |
16 |
index 0000000000..3ddc610d4a |
17 |
--- /dev/null |
18 |
+++ b/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch |
19 |
@@ -0,0 +1,16 @@ |
20 |
+https://bugs.gentoo.org/586092 |
21 |
+ |
22 |
+this might not be correct, but at least it builds, and doesn't crash |
23 |
+ |
24 |
+--- a/src/coredump/_UCD_access_reg_linux.c |
25 |
++++ b/src/coredump/_UCD_access_reg_linux.c |
26 |
+@@ -51,6 +51,9 @@ _UCD_access_reg (unw_addr_space_t as, |
27 |
+ #elif defined(UNW_TARGET_TILEGX) |
28 |
+ if (regnum < 0 || regnum > UNW_TILEGX_CFA) |
29 |
+ goto badreg; |
30 |
++#elif defined(UNW_TARGET_IA64) || defined(UNW_TARGET_HPPA) || defined(UNW_TARGET_PPC32) || defined(UNW_TARGET_PPC64) |
31 |
++ if (regnum < 0 || regnum >= ARRAY_SIZE(ui->prstatus->pr_reg)) |
32 |
++ goto badreg; |
33 |
+ #else |
34 |
+ #if defined(UNW_TARGET_MIPS) |
35 |
+ static const uint8_t remap_regs[] = |
36 |
|
37 |
diff --git a/sys-libs/libunwind/libunwind-1.2.ebuild b/sys-libs/libunwind/libunwind-1.2.ebuild |
38 |
index a95f69a728..bf4a5a9fd3 100644 |
39 |
--- a/sys-libs/libunwind/libunwind-1.2.ebuild |
40 |
+++ b/sys-libs/libunwind/libunwind-1.2.ebuild |
41 |
@@ -45,6 +45,8 @@ MULTILIB_WRAPPED_HEADERS=( |
42 |
) |
43 |
|
44 |
src_prepare() { |
45 |
+ epatch "${FILESDIR}"/${PN}-1.2-coredump-regs.patch #586092 |
46 |
+ |
47 |
# These tests like to fail. bleh. |
48 |
echo 'int main(){return 0;}' > tests/Gtest-dyn1.c |
49 |
echo 'int main(){return 0;}' > tests/Ltest-dyn1.c |