diff options
author | Stuart Shelton <stuart@shelton.me> | 2017-10-03 23:02:33 +0100 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2017-10-03 23:04:55 +0100 |
commit | 75a8b57d20bc4f8fde8295c5b80ec4886c2c7614 (patch) | |
tree | 602a45c1c65be88e53e5e4d8dcd3e3e680de8a44 /sys-libs | |
parent | Update sys-apps/coreutils-8.26 (diff) | |
download | srcshelton-75a8b57d20bc4f8fde8295c5b80ec4886c2c7614.tar.gz srcshelton-75a8b57d20bc4f8fde8295c5b80ec4886c2c7614.tar.bz2 srcshelton-75a8b57d20bc4f8fde8295c5b80ec4886c2c7614.zip |
Add sys-libs/libunwind-1.2.1, update sys-libs/libunwind-1.1-r1
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libunwind/Manifest | 9 | ||||
-rw-r--r-- | sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch | 16 | ||||
-rw-r--r-- | sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch | 93 | ||||
-rw-r--r-- | sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch | 34 | ||||
-rw-r--r-- | sys-libs/libunwind/files/libunwind-1.2-ia64-undwarf.patch | 17 | ||||
-rw-r--r-- | sys-libs/libunwind/files/libunwind-1.2-x32.patch | 13 | ||||
-rw-r--r-- | sys-libs/libunwind/libunwind-1.1-r1.ebuild | 4 | ||||
-rw-r--r-- | sys-libs/libunwind/libunwind-1.2.1.ebuild | 100 |
8 files changed, 283 insertions, 3 deletions
diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest index 02f22367..b3a5113f 100644 --- a/sys-libs/libunwind/Manifest +++ b/sys-libs/libunwind/Manifest @@ -1,5 +1,12 @@ AUX libunwind-1.1-fix-CVE-2015-3239.patch 523 SHA256 3d37676dfaf88e267fd2e0422db93b9613f91af40fc5f4189806a64a23b07de9 SHA512 71f28720486c07cbbc31cf2747096e324cc43dd57c4ec9312da12fd4aa9d5af83e4cbe80071b6192cdf14a2e2afd090c136e57476ac981204a933db67d609c01 WHIRLPOOL 5c2b15253ca2ef597ebf6a6ae1b26c5728ce50dd5468c6115546b0af83e19b73c5becf3d1885b275e7619318f279dbb0eab531905b64c3bc87c8fb2cdd1fc31b AUX libunwind-1.1-lzma.patch 3004 SHA256 84716d048c507862761f4889871ab6428f9ca5818baeb3bddbc5612d5ff3ef15 SHA512 d15f849d743426fd030de2990d683a5373273ecfc407b081280e7f5fb2e65350496badb7b094911719e5b3f6bdac5ddf2653e556391c58a8559938a11f60250c WHIRLPOOL 3d56eed2a93fa373516d923bf0c491c68c464e62c0302ba0bc995d2491b27b01b109dd750bc47079f66c163c5f1a1a5d13c541709c0090ff78926bcdc98da992 AUX libunwind-1.1-x32.patch 448 SHA256 6d2c3a0054830dcf89c36ad00efc14f3cfaeb69124eacbf1234658d017bee30a SHA512 fcfb19b71cef5ae0141818f0dd246c9a3fdc8ca4eae1baea3ee4f96edecdeabce6cba412fe7e35c55c4294655dda196ddd8bceeefb146c9b1c12aaaa05300df2 WHIRLPOOL dc104ec70e57bde17f79571a9682cac70609d712d2191e41a17614566efbf09e301b48a5fd387cf0340a563569e821a57cce7cf1484772f01788388fab54774e +AUX libunwind-1.2-coredump-regs.patch 619 SHA256 81383383135b5f12aab63d62fa54c18bf13fe659e1a5a8a5ae35dba95b72c755 SHA512 48536ef54590221b42a3ca568ec781e526807b3d8aed3e33e19e6efacfa05a428a6101d3a51e79ea5d3e1d783bcba9acb92f7623c121d3e00cd3e1a17d13e282 WHIRLPOOL caa4a9a7b9fa1ee2aede2e2af5010472a459076d093191994496afd0beb7446b18e619041594cce346e03313808413fead02a0f4e65ef91da5a66d38f51e2e0a +AUX libunwind-1.2-ia64-missing.patch 3863 SHA256 e5163247366ca68c5e2671208f2a848e1e25c23d1e56099ddabe0b65d36c538e SHA512 e8f65d706839770d993f9801371e1e294a0231c4bfe29b497e4a859567b7f5b6561b0a15d59b1626311e549fe57149046f5a76424a2ad69c521610aaa3019c17 WHIRLPOOL 10304bd170ce4e23bf82ca656ab460ff1d7ba0414b103329916afb6eea238155e001b70d83c4a138e950b095b5d259e966c00733c8f750e6e748a5fd577b11f9 +AUX libunwind-1.2-ia64-ptrace-coredump.patch 1445 SHA256 003e6a4724cb2ffb25bd5f18666e0b5866d5f701ca26275a8a1c90617ae79e73 SHA512 0bab310ff16294d7617077ffa1261fe9c1a6aaeb4339c96918869c4dd9a2b1b73fbe2ebb5c895f1a420ff7922da85cbb44ccfcd69df6e2518c1f2ff64b7b2d76 WHIRLPOOL 56878f6eed550b99dac1104d7a227d3954d57ad3e374bdee8049599035cd508945df2ec98c51376e9f0b719dc30b76295087df208609e5d0494e4215f918b106 +AUX libunwind-1.2-ia64-undwarf.patch 581 SHA256 24dc59a2e18c8638430cb492e2c0655a1b4f9a5e14166fc89be403878913ea28 SHA512 a83dd2d2bea706fb0f57b854015c6f1db882d649e931e12bb1a5524c8176e326d7d4a448f986c9475d1bd4c6e22a0e9a1c813c7a5b47fcd61457806c1f32fe85 WHIRLPOOL 2e0b3fb09b96312ad492d62cc7ce00ab5277bca810725e45f71a77a441acc46f6fe7719bc8a9809999a0f2b44323f56ccd4d3d105419e243f24359945f89bda7 +AUX libunwind-1.2-x32.patch 531 SHA256 458fee923fcdfee0bffa0ed2f38b986f331f81fac89fc208109ca9aecb3bb6d8 SHA512 b7b7f61a9d74aad8b38450234b4bf346ab28e1057a5e1dc717e064944ed4b0bb4624ab7ece2ce21b30559bb4df669cb2009c7745afff7bdda0c1358d76596c35 WHIRLPOOL e17861f8f5a479b14e747ff62fd3aa79308cc4e253c9099dc2fde5677cd069aa9b6462ef6cb99ca6caa72faecf173b81bb5810b8943c37e6a4e0b1f071ff9512 DIST libunwind-1.1.tar.gz 1098603 SHA256 9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a SHA512 bfe04f2bfac9f9e47c37f0b23ed2f264d8d3d3d6f1392fe9d794ee13cad216b3740979e922e4276fb65c1ccdc836fce48812cb5459ecdd2a89a621036a35d7c1 WHIRLPOOL 1a0e566edf92c0563cb5525203f2718c3454bc0be25ec8079cde8441de08b6d8951db7cbf2f0a02a4a0f1e6c350e74e551a482d9094996daefa216a79bc9d383 -EBUILD libunwind-1.1-r1.ebuild 2480 SHA256 31f8b31e58bd481951afb667fb93fbabf2b597f382668b681796d7c4079fb411 SHA512 c812e2f40e2277034118726dfa7b5a423ae53a8eb8dd3d112386dd6df50271f4bf56291916c8a34cd6c9c8beb439b7cb913548a2f1a218396d9e7f343ea0a84d WHIRLPOOL a3eb3f8f55d17e66aa78229f9118b5bba3b4d7edd30c2aa1282186238b259210e2e4f0101242d40d2adb64f98b600a0c3a8f0f46d1713d423fcf08a24e05d56f +DIST libunwind-1.2.1.tar.gz 780774 SHA256 3f3ecb90e28cbe53fba7a4a27ccce7aad188d3210bb1964a923a731a27a75acb SHA512 af7c280d2a963779a4a2711887618bc96383011e4e5d52e4085aa7fb351e55e357468f6ff85e66a216f1c6826538f498335a917a5970575c93be74c96316319b WHIRLPOOL 68cd0bd09b08000b11edb0912ccb7b6b17c8a4ac73fa3c409f17eb9581ac29e7ca015a37cb13a9741725e89caba58d91fa4f5cd18995449593188aedccbddc25 +EBUILD libunwind-1.1-r1.ebuild 2511 SHA256 ec965bdde8be141aacd23bde7a305c2e8cc144b1d45231e6799357dd26d582b9 SHA512 e32026307a03948814cddb30e185bfeeae31cc9bb02584bdcd9cb67ca69ca5ecc77f8b1f0ea75b036aa685afa8e548faa7e0b72d5e15f2036d2be6126296b3d6 WHIRLPOOL bcc9dbd6fdd110cd5e84ef35125daea9b95e848eb466bcc58b955bf8c955899e117cb81fc31b6be3a8c517661e538316697151c558ccbc79a432307bb68f6fc1 +EBUILD libunwind-1.2.1.ebuild 3023 SHA256 fd234c2b34ee3b73edb8e2ccbfd59adb72eefadd0f690ff139332091b07bd4bc SHA512 c599ae9175e00570f45b2bca408ab37149c33be5a44e888df9aa30f5ea18679576fd039542b67eda4a2d9fd7b302dd4b6507b7fa99e1d058c389819a7922b013 WHIRLPOOL 3fb1b33a3e6f3477599b244abab96ae9a3e8087f0d35e13c465c7c2f2e1a489afc1c2ae06256759ad06615524d3f6b5237855b8c628974598b257544e4cd7ce8 diff --git a/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch b/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch new file mode 100644 index 00000000..3ddc610d --- /dev/null +++ b/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch @@ -0,0 +1,16 @@ +https://bugs.gentoo.org/586092 + +this might not be correct, but at least it builds, and doesn't crash + +--- a/src/coredump/_UCD_access_reg_linux.c ++++ b/src/coredump/_UCD_access_reg_linux.c +@@ -51,6 +51,9 @@ _UCD_access_reg (unw_addr_space_t as, + #elif defined(UNW_TARGET_TILEGX) + if (regnum < 0 || regnum > UNW_TILEGX_CFA) + goto badreg; ++#elif defined(UNW_TARGET_IA64) || defined(UNW_TARGET_HPPA) || defined(UNW_TARGET_PPC32) || defined(UNW_TARGET_PPC64) ++ if (regnum < 0 || regnum >= ARRAY_SIZE(ui->prstatus->pr_reg)) ++ goto badreg; + #else + #if defined(UNW_TARGET_MIPS) + static const uint8_t remap_regs[] = diff --git a/sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch b/sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch new file mode 100644 index 00000000..e15250b4 --- /dev/null +++ b/sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch @@ -0,0 +1,93 @@ +Original libunwind release is missing a few ia64-specific files in tarball. +diff --git a/src/ia64/mk_Gcursor_i.c b/src/ia64/mk_Gcursor_i.c +new file mode 100644 +index 0000000..67b14d5 +--- /dev/null ++++ b/src/ia64/mk_Gcursor_i.c +@@ -0,0 +1,65 @@ ++/* libunwind - a platform-independent unwind library ++ Copyright (C) 2003 Hewlett-Packard Co ++ Contributed by David Mosberger-Tang <davidm@hpl.hp.com> ++ ++This file is part of libunwind. ++ ++Permission is hereby granted, free of charge, to any person obtaining ++a copy of this software and associated documentation files (the ++"Software"), to deal in the Software without restriction, including ++without limitation the rights to use, copy, modify, merge, publish, ++distribute, sublicense, and/or sell copies of the Software, and to ++permit persons to whom the Software is furnished to do so, subject to ++the following conditions: ++ ++The above copyright notice and this permission notice shall be ++included in all copies or substantial portions of the Software. ++ ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE ++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION ++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ ++ ++/* Utility to generate cursor_i.h. */ ++ ++#include "libunwind_i.h" ++ ++#ifdef offsetof ++# undef offsetof ++#endif ++ ++#define offsetof(type,field) ((char *) &((type *) 0)->field - (char *) 0) ++ ++#define OFFSET(sym, offset) \ ++ asm volatile("\n->" #sym " %0" : : "i" (offset)) ++ ++int ++main (void) ++{ ++ OFFSET("IP_OFF", offsetof (struct cursor, ip)); ++ OFFSET("PR_OFF", offsetof (struct cursor, pr)); ++ OFFSET("BSP_OFF", offsetof (struct cursor, bsp)); ++ OFFSET("PSP_OFF", offsetof (struct cursor, psp)); ++ OFFSET("PFS_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_PFS])); ++ OFFSET("RNAT_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_RNAT])); ++ OFFSET("UNAT_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_UNAT])); ++ OFFSET("LC_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_LC])); ++ OFFSET("FPSR_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_FPSR])); ++ OFFSET("B1_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B1])); ++ OFFSET("B2_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B2])); ++ OFFSET("B3_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B3])); ++ OFFSET("B4_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B4])); ++ OFFSET("B5_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_B5])); ++ OFFSET("F2_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F2])); ++ OFFSET("F3_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F3])); ++ OFFSET("F4_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F4])); ++ OFFSET("F5_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F5])); ++ OFFSET("FR_LOC_OFF", offsetof (struct cursor, loc[IA64_REG_F16])); ++ OFFSET("LOC_SIZE", ++ (offsetof (struct cursor, loc[1]) - offsetof (struct cursor, loc[0]))); ++ OFFSET("SIGCONTEXT_ADDR_OFF", offsetof (struct cursor, sigcontext_addr)); ++ return 0; ++} +diff --git a/src/ia64/mk_Lcursor_i.c b/src/ia64/mk_Lcursor_i.c +new file mode 100644 +index 0000000..aee2e7e +--- /dev/null ++++ b/src/ia64/mk_Lcursor_i.c +@@ -0,0 +1,2 @@ ++#define UNW_LOCAL_ONLY ++#include "mk_Gcursor_i.c" +diff --git a/src/ia64/mk_cursor_i b/src/ia64/mk_cursor_i +new file mode 100755 +index 0000000..9211f91 +--- /dev/null ++++ b/src/ia64/mk_cursor_i +@@ -0,0 +1,7 @@ ++#!/bin/sh ++test -z "$1" && exit 1 ++echo "/* GENERATED */" ++echo "#ifndef cursor_i_h" ++echo "#define cursor_i_h" ++sed -ne 's/^->"\(\S*\)" \(\d*\)/#define \1 \2/p' < $1 || exit $? ++echo "#endif" diff --git a/sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch b/sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch new file mode 100644 index 00000000..3785d882 --- /dev/null +++ b/sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch @@ -0,0 +1,34 @@ +Fix build failure on ia64. + coredump/_UPT_get_dyn_info_list_addr.c +is almost identical to + ptrace/_UPT_get_dyn_info_list_addr.c +It's clearly an __ia64 implementation copy. +diff --git a/src/coredump/_UPT_get_dyn_info_list_addr.c b/src/coredump/_UPT_get_dyn_info_list_addr.c +index 0d11905..176b146 100644 +--- a/src/coredump/_UPT_get_dyn_info_list_addr.c ++++ b/src/coredump/_UPT_get_dyn_info_list_addr.c +@@ -31,2 +31,3 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + # include "os-linux.h" ++# include "../ptrace/_UPT_internal.h" + +@@ -40,3 +41,2 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, + char path[PATH_MAX]; +- unw_dyn_info_t *di; + unw_word_t res; +@@ -50,5 +50,5 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, + +- invalidate_edi (&ui->edi); ++ invalidate_edi(&ui->edi); + +- if (elf_map_image (&ui->ei, path) < 0) ++ if (elf_map_image (&ui->edi.ei, path) < 0) + /* ignore unmappable stuff like "/SYSV00001b58 (deleted)" */ +@@ -58,6 +58,5 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg, + +- di = tdep_find_unwind_table (&ui->edi, as, path, lo, off); +- if (di) ++ if (tdep_find_unwind_table (&ui->edi, as, path, lo, off, 0) > 0) + { +- res = _Uia64_find_dyn_list (as, di, arg); ++ res = _Uia64_find_dyn_list (as, &ui->edi.di_cache, arg); + if (res && count++ == 0) diff --git a/sys-libs/libunwind/files/libunwind-1.2-ia64-undwarf.patch b/sys-libs/libunwind/files/libunwind-1.2-ia64-undwarf.patch new file mode 100644 index 00000000..1e3e2489 --- /dev/null +++ b/sys-libs/libunwind/files/libunwind-1.2-ia64-undwarf.patch @@ -0,0 +1,17 @@ +diff --git a/src/mi/Gget_proc_name.c b/src/mi/Gget_proc_name.c +index 5376f82..64d2503 100644 +--- a/src/mi/Gget_proc_name.c ++++ b/src/mi/Gget_proc_name.c +@@ -106,8 +106,12 @@ unw_get_proc_name (unw_cursor_t *cursor, char *buf, size_t buf_len, + ip = tdep_get_ip (c); ++#if !defined(__ia64) + if (c->dwarf.use_prev_instr) + --ip; ++#endif + error = get_proc_name (tdep_get_as (c), ip, buf, buf_len, offp, + tdep_get_as_arg (c)); ++#if !defined(__ia64) + if (c->dwarf.use_prev_instr && offp != NULL && error == 0) + *offp += 1; ++#endif + return error; diff --git a/sys-libs/libunwind/files/libunwind-1.2-x32.patch b/sys-libs/libunwind/files/libunwind-1.2-x32.patch new file mode 100644 index 00000000..76437015 --- /dev/null +++ b/sys-libs/libunwind/files/libunwind-1.2-x32.patch @@ -0,0 +1,13 @@ +--- a/src/x86_64/Gos-linux.c ++++ b/src/x86_64/Gos-linux.c +@@ -143,8 +143,8 @@ x86_64_sigreturn (unw_cursor_t *cursor) + + Debug (8, "resuming at ip=%llx via sigreturn(%p)\n", + (unsigned long long) c->dwarf.ip, sc); +- __asm__ __volatile__ ("mov %0, %%rsp;" +- "mov %1, %%rax;" ++ __asm__ __volatile__ ("mov %q0, %%rsp;" ++ "mov %q1, %%rax;" + "syscall" + :: "r"(sc), "i"(SYS_rt_sigreturn) + : "memory"); diff --git a/sys-libs/libunwind/libunwind-1.1-r1.ebuild b/sys-libs/libunwind/libunwind-1.1-r1.ebuild index 17a26ac1..11a37aff 100644 --- a/sys-libs/libunwind/libunwind-1.1-r1.ebuild +++ b/sys-libs/libunwind/libunwind-1.1-r1.ebuild @@ -12,7 +12,7 @@ SRC_URI="mirror://nongnu/libunwind/${P}.tar.gz" LICENSE="MIT" SLOT="7" KEYWORDS="amd64 arm hppa ia64 ~mips ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" -IUSE="debug debug-frame libatomic lzma static-libs" +IUSE="abi_x86_x32 debug debug-frame libatomic lzma static-libs" RESTRICT="test" #461958 -- re-enable tests with >1.1 again for retesting, this is here for #461394 @@ -37,7 +37,7 @@ src_prepare() { sed -i -e '/LIBLZMA/s:-lzma:-llzma:' configure{.ac,} || die #444050 epatch "${FILESDIR}"/${P}-lzma.patch #444050 epatch "${FILESDIR}"/${P}-fix-CVE-2015-3239.patch #585830 - epatch "${FILESDIR}"/${P}-x32.patch + use abi_x86_x32 && epatch "${FILESDIR}"/${P}-x32.patch elibtoolize } diff --git a/sys-libs/libunwind/libunwind-1.2.1.ebuild b/sys-libs/libunwind/libunwind-1.2.1.ebuild new file mode 100644 index 00000000..53791427 --- /dev/null +++ b/sys-libs/libunwind/libunwind-1.2.1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +MY_PV=${PV/_/-} +MY_P=${PN}-${MY_PV} +inherit eutils libtool multilib-minimal + +DESCRIPTION="Portable and efficient API to determine the call-chain of a program" +HOMEPAGE="https://savannah.nongnu.org/projects/libunwind" +SRC_URI="mirror://nongnu/libunwind/${MY_P}.tar.gz" + +LICENSE="MIT" +SLOT="7" +KEYWORDS="amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="abi_x86_x32 debug debug-frame doc libatomic lzma static-libs" + +RESTRICT="test" # half of tests are broken (toolchain version dependent) + +# We just use the header from libatomic. +RDEPEND="lzma? ( app-arch/xz-utils )" +DEPEND="${RDEPEND} + libatomic? ( dev-libs/libatomic_ops )" + +# Bug 586208 +CCACHE_NODIRECT=1 + +S="${WORKDIR}/${MY_P}" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/libunwind.h + + # see libunwind.h for the full list of arch-specific headers + /usr/include/libunwind-aarch64.h + /usr/include/libunwind-arm.h + /usr/include/libunwind-hppa.h + /usr/include/libunwind-ia64.h + /usr/include/libunwind-mips.h + /usr/include/libunwind-ppc32.h + /usr/include/libunwind-ppc64.h + /usr/include/libunwind-sh.h + /usr/include/libunwind-tilegx.h + /usr/include/libunwind-x86.h + /usr/include/libunwind-x86_64.h +) + +PATCHES=( + "${FILESDIR}"/${PN}-1.2-coredump-regs.patch #586092 + "${FILESDIR}"/${PN}-1.2-ia64-undwarf.patch + "${FILESDIR}"/${PN}-1.2-ia64-ptrace-coredump.patch + "${FILESDIR}"/${PN}-1.2-ia64-missing.patch +) + +src_prepare() { + use abi_x86_x32 && PATCHES+=( "${FILESDIR}"/${PN}-1.2-x32.patch ) + + default + chmod +x src/ia64/mk_cursor_i || die + # Since we have tests disabled via RESTRICT, disable building in the subdir + # entirely. This worksaround some build errors too. #484846 + sed -i -e '/^SUBDIRS/s:tests::' Makefile.in || die + + elibtoolize +} + +multilib_src_configure() { + # --enable-cxx-exceptions: always enable it, headers provide the interface + # and on some archs it is disabled by default causing a mismatch between the + # API and the ABI, bug #418253 + # conservative-checks: validate memory addresses before use; as of 1.0.1, + # only x86_64 supports this, yet may be useful for debugging, couple it with + # debug useflag. + ECONF_SOURCE="${S}" \ + ac_cv_header_atomic_ops_h=$(usex libatomic) \ + econf \ + --enable-cxx-exceptions \ + --enable-coredump \ + --enable-ptrace \ + --enable-setjmp \ + $(use_enable debug-frame) \ + $(use_enable doc documentation) \ + $(use_enable lzma minidebuginfo) \ + $(use_enable static-libs static) \ + $(use_enable debug conservative_checks) \ + $(use_enable debug) +} + +multilib_src_test() { + # Explicitly allow parallel build of tests. + # Sandbox causes some tests to freak out. + SANDBOX_ON=0 emake check +} + +multilib_src_install() { + default + # libunwind-ptrace.a (and libunwind-ptrace.h) is separate API and without + # shared library, so we keep it in any case + use static-libs || find "${ED}"usr '(' -name 'libunwind-generic.a' -o -name 'libunwind*.la' ')' -delete +} |