From 5f434ded9785300fbd9d0f33f7fdcea2f69ff636 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 1 Sep 2019 05:13:47 +0000 Subject: [PATCH 1/2] sys-libs/libunwind: Install libunwind*.so.* for native ABI with USE="split-usr" in /lib instead of /usr/lib. Block --- sys-libs/libunwind/libunwind-1.2.1-r4.ebuild | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/sys-libs/libunwind/libunwind-1.2.1-r4.ebuild b/sys-libs/libunwind/libunwind-1.2.1-r4.ebuild index 243773f322c..705a2e2b9b1 100644 --- a/sys-libs/libunwind/libunwind-1.2.1-r4.ebuild +++ b/sys-libs/libunwind/libunwind-1.2.1-r4.ebuild @@ -6,7 +6,7 @@ EAPI="7" MY_PV=${PV/_/-} MY_P=${PN}-${MY_PV} -inherit autotools libtool multilib-minimal +inherit autotools libtool multilib multilib-minimal usr-ldscript DESCRIPTION="Portable and efficient API to determine the call-chain of a program" HOMEPAGE="https://savannah.nongnu.org/projects/libunwind" @@ -24,7 +24,8 @@ RDEPEND="lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )" DEPEND="${RDEPEND} libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )" RDEPEND+=" - !${CATEGORY}/${PN}:7" + !${CATEGORY}/${PN}:7 + ! /dev/null || die + ( + shopt -s extglob + # Names of libraries are architecture-specific. + # libunwind-generic should be skipped, because it is symbolic link + # to another library in this list. + eval "local libraries=(libunwind!(-generic)$(get_libname))" + libraries=("${libraries[@]#lib}") + libraries=("${libraries[@]%$(get_libname)}") + gen_usr_ldscript -a "${libraries[@]}" + ) + popd > /dev/null || die + if ! use static-libs; then # Obsolete after http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=commitdiff;h=4e8b7a595e144e905fd9c8aed053d7529afb78a4 rm "${ED}/usr/$(get_libdir)/libunwind-generic.a" || die -- 2.23.0 From 0a453d34687d8554dbffeab17362ca3b8a05f495 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 1 Sep 2019 05:20:33 +0000 Subject: [PATCH 2/2] toolchain.eclass: Make GCC >=3.4.3 use sys-libs/libunwind on IA64. Closes: https://bugs.gentoo.org/693252 Signed-off-by: Arfrever Frehtes Taifersar Arahesis --- eclass/toolchain.eclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 529c12a4116..3ea9301050d 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -186,6 +186,8 @@ RDEPEND="sys-libs/zlib tc_version_is_at_least 3 && RDEPEND+=" virtual/libiconv" +tc_version_is_at_least 3.4.3 && RDEPEND+=" ia64? ( sys-libs/libunwind:0= )" + if tc_version_is_at_least 4 ; then GMP_MPFR_DEPS=">=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0=" if tc_version_is_at_least 4.3 ; then @@ -966,7 +968,13 @@ toolchain_src_configure() { confgcc+=( --disable-nls ) fi - tc_version_is_at_least 3.4 || confgcc+=( --disable-libunwind-exceptions ) + if tc_version_is_at_least 3.4.3 ; then + # libunwind is used only on ia64*-*-linux* targets. + # This option is ignored on other targets. + confgcc+=( --with-system-libunwind ) + else + confgcc+=( --disable-libunwind-exceptions ) + fi # Use the default ("release") checking because upstream usually neglects # to test "disabled" so it has a history of breaking. #317217 -- 2.23.0