public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2016-06-13 18:13 Mike Frysinger
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2016-06-13 18:13 UTC (permalink / raw
  To: gentoo-commits

commit:     c16a9a7ccf4b0e56ca6481852cf6fce826c90ba0
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 18:11:52 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 18:13:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c16a9a7c

sys-libs/libunwind: add fix from Fedora for CVE-2015-3239 #585830

 .../files/libunwind-1.1-fix-CVE-2015-3239.patch    | 15 +++++
 sys-libs/libunwind/libunwind-1.1-r1.ebuild         | 75 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/sys-libs/libunwind/files/libunwind-1.1-fix-CVE-2015-3239.patch b/sys-libs/libunwind/files/libunwind-1.1-fix-CVE-2015-3239.patch
new file mode 100644
index 0000000..153108b
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.1-fix-CVE-2015-3239.patch
@@ -0,0 +1,15 @@
+taken from Fedora
+
+https://bugs.gentoo.org/585830
+
+--- libunwind-1.1/include/dwarf_i.h.CVE20153239
++++ libunwind-1.1/include/dwarf_i.h
+@@ -20,7 +20,7 @@
+ extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH];
+ /* REG is evaluated multiple times; it better be side-effects free!  */
+ # define dwarf_to_unw_regnum(reg)					  \
+-  (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
++  (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
+ #endif
+ 
+ #ifdef UNW_LOCAL_ONLY

diff --git a/sys-libs/libunwind/libunwind-1.1-r1.ebuild b/sys-libs/libunwind/libunwind-1.1-r1.ebuild
new file mode 100644
index 0000000..5403e33
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.1-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils libtool
+
+DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
+HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
+SRC_URI="http://download.savannah.nongnu.org/releases/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"
+
+RESTRICT="test" #461958 -- re-enable tests with >1.1 again for retesting, this is here for #461394
+
+# We just use the header from libatomic.
+RDEPEND="lzma? ( app-arch/xz-utils )"
+DEPEND="${RDEPEND}
+	libatomic? ( dev-libs/libatomic_ops )"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+QA_DT_NEEDED_x86_fbsd="usr/lib/libunwind.so.7.0.0"
+
+src_prepare() {
+	# These tests like to fail.  bleh.
+	echo 'int main(){return 0;}' > tests/Gtest-dyn1.c
+	echo 'int main(){return 0;}' > tests/Ltest-dyn1.c
+
+	# 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
+
+	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
+	elibtoolize
+}
+
+src_configure() {
+	# do not $(use_enable) because the configure.in is broken and parses
+	# --disable-debug the same as --enable-debug.
+	# https://savannah.nongnu.org/bugs/index.php?34324
+	# --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.
+	ac_cv_header_atomic_ops_h=$(usex libatomic) \
+	econf \
+		--enable-cxx-exceptions \
+		$(use_enable debug-frame) \
+		$(use_enable lzma minidebuginfo) \
+		$(use_enable static-libs static) \
+		$(use_enable debug conservative_checks) \
+		$(use debug && echo --enable-debug)
+}
+
+src_test() {
+	# Explicitly allow parallel build of tests.
+	# Sandbox causes some tests to freak out.
+	SANDBOX_ON=0 emake check
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2017-02-14  2:51 Mike Frysinger
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2017-02-14  2:51 UTC (permalink / raw
  To: gentoo-commits

commit:     e01ced2da69c0d913e4c91467a0ca5fc3615edcd
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 02:51:24 2017 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 02:51:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e01ced2d

sys-libs/libunwind: fix build errors on hppa/ia64/ppc/ppc64 #586092

 .../libunwind/files/libunwind-1.2-coredump-regs.patch    | 16 ++++++++++++++++
 sys-libs/libunwind/libunwind-1.2.ebuild                  |  2 ++
 2 files changed, 18 insertions(+)

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 0000000000..3ddc610d4a
--- /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/libunwind-1.2.ebuild b/sys-libs/libunwind/libunwind-1.2.ebuild
index a95f69a728..bf4a5a9fd3 100644
--- a/sys-libs/libunwind/libunwind-1.2.ebuild
+++ b/sys-libs/libunwind/libunwind-1.2.ebuild
@@ -45,6 +45,8 @@ MULTILIB_WRAPPED_HEADERS=(
 )
 
 src_prepare() {
+	epatch "${FILESDIR}"/${PN}-1.2-coredump-regs.patch #586092
+
 	# These tests like to fail.  bleh.
 	echo 'int main(){return 0;}' > tests/Gtest-dyn1.c
 	echo 'int main(){return 0;}' > tests/Ltest-dyn1.c


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2017-07-13 21:38 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2017-07-13 21:38 UTC (permalink / raw
  To: gentoo-commits

commit:     e6a35a1b4a009bd4af76f0152cf2d0d028039848
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 13 21:37:28 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Jul 13 21:37:59 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6a35a1b

sys-libs/libunwind: workaround build failure on ia64

Missing files in tarball, outdated implementation.
While at it fixed SRC_URI to point to mirrors://nongnu.

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 .../files/libunwind-1.2-ia64-missing.patch         | 93 ++++++++++++++++++++++
 .../files/libunwind-1.2-ia64-ptrace-coredump.patch | 34 ++++++++
 .../files/libunwind-1.2-ia64-undwarf.patch         | 17 ++++
 sys-libs/libunwind/libunwind-1.1-r1.ebuild         |  4 +-
 sys-libs/libunwind/libunwind-1.2.ebuild            |  6 +-
 sys-libs/libunwind/libunwind-1.2_rc1.ebuild        |  4 +-
 6 files changed, 153 insertions(+), 5 deletions(-)

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 00000000000..e15250b4c61
--- /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 00000000000..3785d8820cd
--- /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 00000000000..1e3e2489828
--- /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/libunwind-1.1-r1.ebuild b/sys-libs/libunwind/libunwind-1.1-r1.ebuild
index 5fa695527e4..6028ba3e97c 100644
--- a/sys-libs/libunwind/libunwind-1.1-r1.ebuild
+++ b/sys-libs/libunwind/libunwind-1.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -7,7 +7,7 @@ inherit eutils libtool
 
 DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
 HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
-SRC_URI="http://download.savannah.nongnu.org/releases/libunwind/${P}.tar.gz"
+SRC_URI="mirror://nongnu/libunwind/${P}.tar.gz"
 
 LICENSE="MIT"
 SLOT="7"

diff --git a/sys-libs/libunwind/libunwind-1.2.ebuild b/sys-libs/libunwind/libunwind-1.2.ebuild
index 5c2191d3e1a..1b9c51a459c 100644
--- a/sys-libs/libunwind/libunwind-1.2.ebuild
+++ b/sys-libs/libunwind/libunwind-1.2.ebuild
@@ -9,7 +9,7 @@ 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="http://download.savannah.nongnu.org/releases/libunwind/${MY_P}.tar.gz"
+SRC_URI="mirror://nongnu/libunwind/${MY_P}.tar.gz"
 
 LICENSE="MIT"
 SLOT="7"
@@ -46,6 +46,10 @@ MULTILIB_WRAPPED_HEADERS=(
 
 src_prepare() {
 	epatch "${FILESDIR}"/${PN}-1.2-coredump-regs.patch #586092
+	epatch "${FILESDIR}"/${PN}-1.2-ia64-undwarf.patch
+	epatch "${FILESDIR}"/${PN}-1.2-ia64-ptrace-coredump.patch
+	epatch -p1 "${FILESDIR}"/${PN}-1.2-ia64-missing.patch
+	chmod +x src/ia64/mk_cursor_i || die
 
 	# These tests like to fail.  bleh.
 	echo 'int main(){return 0;}' > tests/Gtest-dyn1.c

diff --git a/sys-libs/libunwind/libunwind-1.2_rc1.ebuild b/sys-libs/libunwind/libunwind-1.2_rc1.ebuild
index 3071165ce32..859d7de8faa 100644
--- a/sys-libs/libunwind/libunwind-1.2_rc1.ebuild
+++ b/sys-libs/libunwind/libunwind-1.2_rc1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -9,7 +9,7 @@ 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="http://download.savannah.nongnu.org/releases/libunwind/${MY_P}.tar.gz"
+SRC_URI="mirror://nongnu/libunwind/${MY_P}.tar.gz"
 
 LICENSE="MIT"
 SLOT="7"


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2018-07-08 10:00 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2018-07-08 10:00 UTC (permalink / raw
  To: gentoo-commits

commit:     738995e4af3a935b410a8f16663feaf3c7e0332a
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  8 09:59:49 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jul  8 10:00:05 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=738995e4

sys-libs/libunwind: fix build with -fuse-ld=gold, bug #659732

Backport upstream patch to drop protected atrribute.

Reported-by: jorgicio
Closes: https://bugs.gentoo.org/659732
Package-Manager: Portage-2.3.41, Repoman-2.3.9

 .../libunwind/files/libunwind-1.2.1-no-PROTECTED.patch     | 14 ++++++++++++++
 sys-libs/libunwind/libunwind-1.2.1-r1.ebuild               |  1 +
 2 files changed, 15 insertions(+)

diff --git a/sys-libs/libunwind/files/libunwind-1.2.1-no-PROTECTED.patch b/sys-libs/libunwind/files/libunwind-1.2.1-no-PROTECTED.patch
new file mode 100644
index 00000000000..6b12d9712ff
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.2.1-no-PROTECTED.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/659732
+https://github.com/libunwind/libunwind/issues/58
+
+From a1437a3d27924e17d00021df3cc659bd998e8580 Mon Sep 17 00:00:00 2001
+From: Dave Watson <davejwatson@fb.com>
+Date: Thu, 28 Dec 2017 08:26:42 -0800
+Subject: [PATCH] Remove PROTECTED visibility
+
+This only works on bfd ld, not lld or gold.
+--- a/include/compiler.h
++++ b/include/compiler.h
+@@ -43 +43 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+-#  define PROTECTED     __attribute__((visibility ("protected")))
++#  define PROTECTED

diff --git a/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild b/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild
index a4690fc050e..8ab6cd4d112 100644
--- a/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild
+++ b/sys-libs/libunwind/libunwind-1.2.1-r1.ebuild
@@ -49,6 +49,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-1.2-ia64-missing.patch
 	"${FILESDIR}"/${PN}-1.2.1-fix_version_macros.patch
 	"${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch
+	"${FILESDIR}"/${PN}-1.2.1-no-PROTECTED.patch #659732
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2018-07-25 19:36 Sergei Trofimovich
  0 siblings, 0 replies; 9+ messages in thread
From: Sergei Trofimovich @ 2018-07-25 19:36 UTC (permalink / raw
  To: gentoo-commits

commit:     273644886b6c4a284d5e8e7788b9680f6ffec198
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 25 19:33:41 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Jul 25 19:35:57 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27364488

sys-libs/libunwind: use __asm__ instead of asm (bug #635674)

An upstream patch ca6b6f3ad9190
"libunwind-arm: fix build failure due to asm()"
should improve support for building mesa on arm.

Reported-by: Maciej S. Szmigiero
Closes: https://bugs.gentoo.org/635674
Package-Manager: Portage-2.3.43, Repoman-2.3.10

 .../files/libunwind-1.2.1-arm-__asm__.patch        |  47 +++++++++
 sys-libs/libunwind/libunwind-1.2.1-r2.ebuild       | 105 +++++++++++++++++++++
 2 files changed, 152 insertions(+)

diff --git a/sys-libs/libunwind/files/libunwind-1.2.1-arm-__asm__.patch b/sys-libs/libunwind/files/libunwind-1.2.1-arm-__asm__.patch
new file mode 100644
index 00000000000..4b6debabefc
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.2.1-arm-__asm__.patch
@@ -0,0 +1,47 @@
+https://bugs.gentoo.org/635674
+
+From ca6b6f3ad9190814ef7869e8c7e73dae0922f647 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@smile.fr>
+Date: Mon, 3 Jul 2017 15:31:10 +0200
+Subject: [PATCH] libunwind-arm: fix build failure due to asm()
+
+mesa3d on ARM build with libunwind support enabled fail to build due to asm()
+function used when building with -std=c99.
+The gcc documentation [1] suggest to use __asm__ instead of asm.
+
+Fixes:
+https://urldefense.proofpoint.com/v2/url?u=http-3A__autobuild.buildroot.net_results_3ef_3efe156b6494e4392b6c31de447ee2c72acc1a53&d=DwICAg&c=5VD0RTtNlTh3ycd41b3MUw&r=vou6lT5jmE_fWQWZZgNrsMWu4RT87QAB9V07tPHlP5U&m=BlAszRQ0vewy5vW7raCh9FmNOACKez_juz55zoiNfUs&s=4sXL6_rFriQz7qi5ygKXBIVHMc7YSdCBnkkHoi347CU&e=
+
+[1] https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords
+
+Signed-off-by: Romain Naour <romain.naour@smile.fr>
+Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ include/libunwind-arm.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/libunwind-arm.h b/include/libunwind-arm.h
+index f208487a..1c856faf 100644
+--- a/include/libunwind-arm.h
++++ b/include/libunwind-arm.h
+@@ -265,7 +265,7 @@ unw_tdep_context_t;
+ #ifndef __thumb__
+ #define unw_tdep_getcontext(uc) (({                                     \
+   unw_tdep_context_t *unw_ctx = (uc);                                   \
+-  register unsigned long *unw_base asm ("r0") = unw_ctx->regs;          \
++  register unsigned long *unw_base __asm__ ("r0") = unw_ctx->regs;      \
+   __asm__ __volatile__ (                                                \
+     "stmia %[base], {r0-r15}"                                           \
+     : : [base] "r" (unw_base) : "memory");                              \
+@@ -273,7 +273,7 @@ unw_tdep_context_t;
+ #else /* __thumb__ */
+ #define unw_tdep_getcontext(uc) (({                                     \
+   unw_tdep_context_t *unw_ctx = (uc);                                   \
+-  register unsigned long *unw_base asm ("r0") = unw_ctx->regs;          \
++  register unsigned long *unw_base __asm__ ("r0") = unw_ctx->regs;      \
+   __asm__ __volatile__ (                                                \
+     ".align 2\nbx pc\nnop\n.code 32\n"                                  \
+     "stmia %[base], {r0-r15}\n"                                         \
+-- 
+2.18.0
+

diff --git a/sys-libs/libunwind/libunwind-1.2.1-r2.ebuild b/sys-libs/libunwind/libunwind-1.2.1-r2.ebuild
new file mode 100644
index 00000000000..eb96d2bf890
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.2.1-r2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+inherit autotools 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="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 )"
+
+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
+	"${FILESDIR}"/${PN}-1.2.1-fix_version_macros.patch
+	"${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch
+	"${FILESDIR}"/${PN}-1.2.1-no-PROTECTED.patch #659732
+	"${FILESDIR}"/${PN}-1.2.1-arm-__asm__.patch #635674
+)
+
+src_prepare() {
+	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
+	eautoreconf
+}
+
+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_compile() {
+	# Bug 586208
+	CCACHE_NODIRECT=1 default
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2021-11-27 14:39 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2021-11-27 14:39 UTC (permalink / raw
  To: gentoo-commits

commit:     c3d1abc7c6970abae8be4b0d2bf0b0c99f25de5f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 27 14:28:37 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 27 14:36:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3d1abc7

sys-libs/libunwind: add 1.6.0

Closes: https://bugs.gentoo.org/802501
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/libunwind/Manifest                        |   1 +
 ....2.1-only-include-execinfo_h-if-avaliable.patch |   2 +
 ...bunwind-1.6.0-avoid-bashisms-in-configure.patch |  22 +++++
 sys-libs/libunwind/libunwind-1.6.0.ebuild          | 100 +++++++++++++++++++++
 4 files changed, 125 insertions(+)

diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest
index a755df1496a0..77c805582db1 100644
--- a/sys-libs/libunwind/Manifest
+++ b/sys-libs/libunwind/Manifest
@@ -1,2 +1,3 @@
 DIST libunwind-1.5.0.tar.gz 878355 BLAKE2B ee35441289926ac22a58bedb9f831d8e13bacd663a99b3ce25eed229f25f0423bbbd90e09e3d62b003518d7a620aa6d15b0dd5b93632736a89fa0667b35d5fc2 SHA512 1df20ca7a8cee2f2e61294fa9b677e88fec52e9d5a329f88d05c2671c69fa462f6c18808c97ca9ff664ef57292537a844f00b18d142b1938c9da701ca95a4bab
 DIST libunwind-1.6.0-rc2.tar.gz 900974 BLAKE2B bbf88b6eb0ddf1371a8d69904e7763d2b2892641f88ed985f342962de7b2d19b6201f84422252aa5ca3d6beed7b3af0e2fe1fdb603497dbe68215ebc94942074 SHA512 7b3933c4693595a85182cc11d24527c5ccda3c3af115a3947bdc9877ecb4a77659a2196f559112868b36cd2cdc5623cabef68ad519fd4017c510ee375b97cbe9
+DIST libunwind-1.6.0.tar.gz 901221 BLAKE2B 360275931399a1cd931e4680f404eff369c9e924d95797d91b61852ab49af2acb2c42ddb9fef72e1e2f39a1bddb6767f7b5f9ba56e27fa581f73db9e3f1168e4 SHA512 89f6355134a3c3175c23fe1a44600d61f15e2533e6816286ad39f799d48f7abdcc03ea354aa1aed859cf277c24e475bc7e625c90b1dc0b69921d03dd1f160464

diff --git a/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch b/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
index ee11149771cd..b6ba0028c80f 100644
--- a/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
+++ b/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
@@ -1,3 +1,5 @@
+https://github.com/libunwind/libunwind/commit/6382d6f5c9d4d149989e47b20446f794365137c1
+
 From 0f3f41a86842f2b19aa07af5242cb775ef9b20d3 Mon Sep 17 00:00:00 2001
 From: "Jory A. Pratt" <anarchy@gentoo.org>
 Date: Sat, 30 Jun 2018 22:44:22 -0500

diff --git a/sys-libs/libunwind/files/libunwind-1.6.0-avoid-bashisms-in-configure.patch b/sys-libs/libunwind/files/libunwind-1.6.0-avoid-bashisms-in-configure.patch
new file mode 100644
index 000000000000..79ac58d1e539
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.6.0-avoid-bashisms-in-configure.patch
@@ -0,0 +1,22 @@
+diff --git a/configure.ac b/configure.ac
+index 0bd2234..42cca58 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -136,7 +136,7 @@ AC_MSG_RESULT([$enable_ptrace])
+ 
+ AC_ARG_ENABLE(setjmp,
+ 	AS_HELP_STRING([--enable-setjmp],[building libunwind-setjmp library]),,
+-        [AS_IF([test x$target_arch == x$host_arch], [enable_setjmp=yes], [enable_setjmp=no])]
++        [AS_IF([test x$target_arch = x$host_arch], [enable_setjmp=yes], [enable_setjmp=no])]
+ )
+ 
+ AC_ARG_ENABLE(documentation,
+@@ -261,7 +261,7 @@ case "${target_arch}" in
+   (aarch64) enable_debug_frame=yes;;
+   (*)   enable_debug_frame=no;;
+ esac])
+-if test x$remote_only == xyes; then
++if test x$remote_only = xyes; then
+   enable_debug_frame=no
+ fi
+ if test x$enable_debug_frame = xyes; then

diff --git a/sys-libs/libunwind/libunwind-1.6.0.ebuild b/sys-libs/libunwind/libunwind-1.6.0.ebuild
new file mode 100644
index 000000000000..9a82c45d2b02
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.6.0.ebuild
@@ -0,0 +1,100 @@
+# Copyright 2005-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+inherit autotools 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"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="MIT"
+SLOT="0/8" # libunwind.so.8
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv -sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug debug-frame doc libatomic lzma static-libs test zlib"
+
+RESTRICT="test !test? ( test )" # some tests are broken (toolchain version dependent, rely on external binaries)
+
+# We just use the header from libatomic.
+RDEPEND="
+	lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
+	zlib? ( sys-libs/zlib[static-libs?,${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+	libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )"
+
+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-riscv.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.6.0-avoid-bashisms-in-configure.patch
+)
+
+src_prepare() {
+	default
+
+	chmod +x src/ia64/mk_cursor_i || die
+
+	eautoreconf
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		# --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
+		--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 zlib zlibdebuginfo)
+		# 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.
+		$(use_enable debug conservative_checks)
+		$(use_enable debug)
+		$(use_enable test tests)
+	)
+
+	export ac_cv_header_atomic_ops_h=$(usex libatomic)
+
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+	# bug #586208
+	CCACHE_NODIRECT=1 default
+}
+
+multilib_src_test() {
+	# Explicitly allow parallel build of tests.
+	# Sandbox causes some tests to freak out.
+	SANDBOX_ON=0 emake check
+}
+
+multilib_src_install_all() {
+	find "${ED}" -name "*.la" -type f -delete || die
+}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2022-05-04  5:41 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-05-04  5:41 UTC (permalink / raw
  To: gentoo-commits

commit:     d2feb8efe92d2e6eeb738040469e4f2d2ae05749
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May  4 05:40:42 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May  4 05:40:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2feb8ef

sys-libs/libunwind: drop 1.5.0-r1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/libunwind/Manifest                        |   1 -
 .../files/libunwind-1.2-coredump-regs.patch        |  16 ---
 .../files/libunwind-1.2-ia64-missing.patch         |  93 ------------------
 .../files/libunwind-1.2-ia64-ptrace-coredump.patch |  34 -------
 ....2.1-only-include-execinfo_h-if-avaliable.patch |  53 ----------
 sys-libs/libunwind/files/libunwind-1.5.0-x32.patch |  17 ----
 sys-libs/libunwind/libunwind-1.5.0-r1.ebuild       | 108 ---------------------
 7 files changed, 322 deletions(-)

diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest
index 2cf810467cc0..7b180086ae0a 100644
--- a/sys-libs/libunwind/Manifest
+++ b/sys-libs/libunwind/Manifest
@@ -1,2 +1 @@
-DIST libunwind-1.5.0.tar.gz 878355 BLAKE2B ee35441289926ac22a58bedb9f831d8e13bacd663a99b3ce25eed229f25f0423bbbd90e09e3d62b003518d7a620aa6d15b0dd5b93632736a89fa0667b35d5fc2 SHA512 1df20ca7a8cee2f2e61294fa9b677e88fec52e9d5a329f88d05c2671c69fa462f6c18808c97ca9ff664ef57292537a844f00b18d142b1938c9da701ca95a4bab
 DIST libunwind-1.6.2.tar.gz 901392 BLAKE2B 3d0313f7e92cbc3e1a84ad3831a5170f21cdf772f1697ca0a59dea63cdd47da382e9f1fd77325d9ff8bcd47559a425dc883a820c646c628cd00faed82cb0f83f SHA512 1d17dfb14f99a894a6cda256caf9ec481c14068aaf8f3a85fa3befa7c7cca7fca0f544a91a3a7c2f2fc55bab19b06a67ca79f55ac9081151d94478c7f611f8f7

diff --git a/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch b/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch
deleted file mode 100644
index 3ddc610d4afc..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2-coredump-regs.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644
index e15250b4c61f..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2-ia64-missing.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-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
deleted file mode 100644
index 3785d8820cd9..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2-ia64-ptrace-coredump.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-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.1-only-include-execinfo_h-if-avaliable.patch b/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
deleted file mode 100644
index b6ba0028c80f..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.2.1-only-include-execinfo_h-if-avaliable.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-https://github.com/libunwind/libunwind/commit/6382d6f5c9d4d149989e47b20446f794365137c1
-
-From 0f3f41a86842f2b19aa07af5242cb775ef9b20d3 Mon Sep 17 00:00:00 2001
-From: "Jory A. Pratt" <anarchy@gentoo.org>
-Date: Sat, 30 Jun 2018 22:44:22 -0500
-Subject: [PATCH] Only include execinfo.h where avaliable
-
-Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
----
- tests/test-coredump-unwind.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
-index 5254708..33f92b0 100644
---- a/tests/test-coredump-unwind.c
-+++ b/tests/test-coredump-unwind.c
-@@ -57,7 +57,9 @@
- #include <grp.h>
- 
- /* For SIGSEGV handler code */
-+#if HAVE_EXECINFO_H
- #include <execinfo.h>
-+#endif
- #include <sys/ucontext.h>
- 
- #include <libunwind-coredump.h>
-@@ -202,7 +204,7 @@ void die_out_of_memory(void)
- /* End of utility logging functions */
- 
- 
--
-+#if HAVE_EXECINFO_H
- static
- void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
- {
-@@ -249,12 +251,14 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
- 
-   _exit(1);
- }
--
-+#endif
- static void install_sigsegv_handler(void)
- {
-   struct sigaction sa;
-   memset(&sa, 0, sizeof(sa));
-+#if HAVE_EXECINFO_H
-   sa.sa_sigaction = handle_sigsegv;
-+#endif
-   sa.sa_flags = SA_SIGINFO;
-   sigaction(SIGSEGV, &sa, NULL);
-   sigaction(SIGILL, &sa, NULL);
--- 
-2.18.0

diff --git a/sys-libs/libunwind/files/libunwind-1.5.0-x32.patch b/sys-libs/libunwind/files/libunwind-1.5.0-x32.patch
deleted file mode 100644
index a3bbc81f45b5..000000000000
--- a/sys-libs/libunwind/files/libunwind-1.5.0-x32.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-https://bugs.gentoo.org/614374
-
-From: kasperk81 <83082615+kasperk81@users.noreply.github.com>
-Date: Wed, 30 Jun 2021 23:23:22 +0000
-Subject: [PATCH] Fix -mx32 compilation error
-
---- a/src/x86_64/Gos-linux.c
-+++ b/src/x86_64/Gos-linux.c
-@@ -149,7 +149,7 @@ x86_64_sigreturn (unw_cursor_t *cursor)
-   __asm__ __volatile__ ("mov %0, %%rsp;"
-                         "mov %1, %%rax;"
-                         "syscall"
--                        :: "r"(sc), "i"(SYS_rt_sigreturn)
-+                        :: "r"((uint64_t)sc), "i"(SYS_rt_sigreturn)
-                         : "memory");
-   abort();
- }

diff --git a/sys-libs/libunwind/libunwind-1.5.0-r1.ebuild b/sys-libs/libunwind/libunwind-1.5.0-r1.ebuild
deleted file mode 100644
index 082fdab6ed88..000000000000
--- a/sys-libs/libunwind/libunwind-1.5.0-r1.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2005-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${MY_PV}
-inherit autotools flag-o-matic 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="0/8" # libunwind.so.8
-KEYWORDS="amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 -riscv -sparc x86 ~amd64-linux ~x86-linux"
-IUSE="debug debug-frame doc libatomic lzma static-libs zlib"
-
-RESTRICT="test" # some tests are broken (toolchain version dependent, rely on external binaries)
-
-# We just use the header from libatomic.
-RDEPEND="
-	lzma? ( app-arch/xz-utils[static-libs?,${MULTILIB_USEDEP}] )
-	zlib? ( sys-libs/zlib[static-libs?,${MULTILIB_USEDEP}] )
-"
-DEPEND="${RDEPEND}
-	libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )"
-
-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-ptrace-coredump.patch
-	"${FILESDIR}"/${PN}-1.2-ia64-missing.patch
-	"${FILESDIR}"/${PN}-1.5.0-x32.patch
-	# needs refresh:
-	#"${FILESDIR}"/${PN}-1.2.1-only-include-execinfo_h-if-avaliable.patch
-)
-
-src_prepare() {
-	default
-	chmod +x src/ia64/mk_cursor_i || die
-	# Since we have tests disabled via RESTRICT, disable building in the subdir
-	# entirely.  This works around some build errors too. #484846
-	sed -i -e '/^SUBDIRS/s:tests::' Makefile.in || die
-
-	elibtoolize
-	eautoreconf
-
-	# Let's wait for proper fix upstream in https://github.com/libunwind/libunwind/issues/154
-	# Meanwhile workaround for gcc-10 with -fcommon, bug #706560
-	append-cflags -fcommon
-}
-
-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 zlib zlibdebuginfo) \
-		$(use_enable debug conservative_checks) \
-		$(use_enable debug)
-}
-
-multilib_src_compile() {
-	# Bug 586208
-	CCACHE_NODIRECT=1 default
-}
-
-multilib_src_test() {
-	# Explicitly allow parallel build of tests.
-	# Sandbox causes some tests to freak out.
-	SANDBOX_ON=0 emake check
-}
-
-multilib_src_install_all() {
-	find "${D}" -name "*.la" -type f -delete || die
-}


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2023-12-02 21:22 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2023-12-02 21:22 UTC (permalink / raw
  To: gentoo-commits

commit:     65fcc50086bba795f212f918479c99d4c74f6a50
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  2 21:17:11 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec  2 21:22:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65fcc500

sys-libs/libunwind: add 1.8.0_rc1 (unkeyworded)

Bug: https://bugs.gentoo.org/918969
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/libunwind/Manifest                        |  1 +
 .../libunwind-1.8.0_rc1-configure-bashism.patch    | 21 +++++++++++++++++++
 ...wind-9999.ebuild => libunwind-1.8.0_rc1.ebuild} | 24 +++++++++++++++-------
 sys-libs/libunwind/libunwind-9999.ebuild           |  7 +++++--
 4 files changed, 44 insertions(+), 9 deletions(-)

diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest
index b40120edf128..6accc5696763 100644
--- a/sys-libs/libunwind/Manifest
+++ b/sys-libs/libunwind/Manifest
@@ -3,3 +3,4 @@ DIST libunwind-1.6.2-loong.patch.xz 122756 BLAKE2B 1d369d18e71c4b9faa79a31a917a0
 DIST libunwind-1.6.2.tar.gz 901392 BLAKE2B 3d0313f7e92cbc3e1a84ad3831a5170f21cdf772f1697ca0a59dea63cdd47da382e9f1fd77325d9ff8bcd47559a425dc883a820c646c628cd00faed82cb0f83f SHA512 1d17dfb14f99a894a6cda256caf9ec481c14068aaf8f3a85fa3befa7c7cca7fca0f544a91a3a7c2f2fc55bab19b06a67ca79f55ac9081151d94478c7f611f8f7
 DIST libunwind-1.7.1-docs.tar.xz 27248 BLAKE2B 0905f49ce72e6cafbb185828a4adf7eb5a88ede335104b1b0679e66199079e3dad9d83815d10a864b4480d88abd82b73bb71181962b1fea39ec41f534d78d549 SHA512 d786572e7fbd5ef7852712f592bd17d4110951083991c5ffcff2bb4ae91e4519b42743f848fe7f2cc9f72d8a0240531ec3d27806972c2c309d06a9048284b97b
 DIST libunwind-1.7.2.tar.gz 912590 BLAKE2B 519570a02d06ce4a174ca226941e493499054112de1c92938434e9fb56fabc8446f699a886ea8beee672ac5e28acd03d16169257a43e2ee1bab084fb331ef4cf SHA512 903f7e26c7d4c22e6ef4fe8954ca0f153fdf346cec40e1e8f7ab966d251110f4deb0a84d1fd150aee194ed966b5c1e01ee27c821cd043859852da33a94faae1f
+DIST libunwind-1.8.0-rc1.tar.gz 977482 BLAKE2B 0cf4dde187b68a2ba642fc588fcb020bf3e631584d4cac888972f714e7c4ce7a88e10a4c816eadec2051f318a196c61f6c3b4ba5e8ebf17ce4e10ff61e6cd0c5 SHA512 0d9cd896a90ea6e36a9a8aeb049ce71ec3a893fcf991533a79bb663c54b0f4b1f04c7b306c06c56e809f829a42284655d52c9fec3d88c60c37f06681dd99d9e3

diff --git a/sys-libs/libunwind/files/libunwind-1.8.0_rc1-configure-bashism.patch b/sys-libs/libunwind/files/libunwind-1.8.0_rc1-configure-bashism.patch
new file mode 100644
index 000000000000..b4e36d71efdc
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.8.0_rc1-configure-bashism.patch
@@ -0,0 +1,21 @@
+https://github.com/libunwind/libunwind/pull/675
+
+From ac81d339a7999e054deda2c0041c01424df3eadd Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 2 Dec 2023 21:18:44 +0000
+Subject: [PATCH] configure.ac: fix bashism in LDFLAGS append
+
+'+=' is not required for POSIX shells and may not work with e.g. /bin/sh
+provided by dash. Just expand it instead.
+--- a/configure.ac
++++ b/configure.ac
+@@ -54,7 +54,7 @@ dnl Checks for libraries.
+ AC_MSG_NOTICE([--- Checking for libraries ---])
+ save_LDFLAGS="$LDFLAGS"
+ save_LIBS="$LIBS"
+-LDFLAGS+=" -nostdlib"
++LDFLAGS="${LDFLAGS} -nostdlib"
+ AC_SEARCH_LIBS([_Unwind_Resume], [gcc_s gcc],
+                [AS_IF([test "$ac_cv_search__Unwind_Resume" != "none required"],
+                       [AC_SUBST([LIBCRTS], ["$ac_cv_search__Unwind_Resume"])])],
+

diff --git a/sys-libs/libunwind/libunwind-9999.ebuild b/sys-libs/libunwind/libunwind-1.8.0_rc1.ebuild
similarity index 88%
copy from sys-libs/libunwind/libunwind-9999.ebuild
copy to sys-libs/libunwind/libunwind-1.8.0_rc1.ebuild
index f851e69da60a..a8d8ee1b3c83 100644
--- a/sys-libs/libunwind/libunwind-9999.ebuild
+++ b/sys-libs/libunwind/libunwind-1.8.0_rc1.ebuild
@@ -6,14 +6,14 @@ EAPI=8
 # Generate using https://github.com/thesamesam/sam-gentoo-scripts/blob/main/niche/generate-libunwind-docs
 # Set to 1 if prebuilt, 0 if not
 # (the construct below is to allow overriding from env for script)
-: ${LIBUNWIND_DOCS_PREBUILT:=1}
+: ${LIBUNWIND_DOCS_PREBUILT:=0}
 
 LIBUNWIND_DOCS_PREBUILT_DEV=sam
 LIBUNWIND_DOCS_VERSION=1.7.1
 # Default to generating docs (inc. man pages) if no prebuilt; overridden later
 LIBUNWIND_DOCS_USEFLAG="+doc"
 
-inherit multilib-minimal
+inherit autotools multilib-minimal
 
 DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
 HOMEPAGE="https://savannah.nongnu.org/projects/libunwind"
@@ -24,12 +24,15 @@ if [[ ${PV} == 9999 ]] ; then
 	EGIT_REPO_URI="https://github.com/libunwind/libunwind"
 	inherit autotools git-r3
 else
-	SRC_URI="https://github.com/libunwind/libunwind/releases/download/v${PV}/${P}.tar.gz"
+	SRC_URI="https://github.com/libunwind/libunwind/releases/download/v${PV/_rc/-rc}/${P/_rc/-rc}.tar.gz"
 	if [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
 		SRC_URI+=" !doc? ( https://dev.gentoo.org/~${LIBUNWIND_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${LIBUNWIND_DOCS_VERSION}-docs.tar.xz )"
 	fi
+	S="${WORKDIR}"/${P/_rc/-rc}
 
-	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 -sparc ~x86 ~amd64-linux ~x86-linux"
+	if [[ ${PV} != *_rc* ]] ; then
+		KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 -sparc ~x86 ~amd64-linux ~x86-linux"
+	fi
 fi
 
 [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] && LIBUNWIND_DOCS_USEFLAG="doc"
@@ -71,14 +74,21 @@ MULTILIB_WRAPPED_HEADERS=(
 	/usr/include/libunwind-x86_64.h
 )
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.8.0_rc1-configure-bashism.patch
+)
+
 src_prepare() {
 	default
 
 	chmod +x src/ia64/mk_cursor_i || die
 
-	if [[ ${PV} == 9999 ]] ; then
-		eautoreconf
-	fi
+	#if [[ ${PV} == 9999 ]] ; then
+	#	eautoreconf
+	#fi
+
+	# temporarily for bashism patch
+	eautoreconf
 }
 
 multilib_src_configure() {

diff --git a/sys-libs/libunwind/libunwind-9999.ebuild b/sys-libs/libunwind/libunwind-9999.ebuild
index f851e69da60a..a3d63d421da6 100644
--- a/sys-libs/libunwind/libunwind-9999.ebuild
+++ b/sys-libs/libunwind/libunwind-9999.ebuild
@@ -24,12 +24,15 @@ if [[ ${PV} == 9999 ]] ; then
 	EGIT_REPO_URI="https://github.com/libunwind/libunwind"
 	inherit autotools git-r3
 else
-	SRC_URI="https://github.com/libunwind/libunwind/releases/download/v${PV}/${P}.tar.gz"
+	SRC_URI="https://github.com/libunwind/libunwind/releases/download/v${PV/_rc/-rc}/${P/_rc/-rc}.tar.gz"
 	if [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] ; then
 		SRC_URI+=" !doc? ( https://dev.gentoo.org/~${LIBUNWIND_DOCS_PREBUILT_DEV}/distfiles/${CATEGORY}/${PN}/${PN}-${LIBUNWIND_DOCS_VERSION}-docs.tar.xz )"
 	fi
+	S="${WORKDIR}"/${P/_rc/-rc}
 
-	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 -sparc ~x86 ~amd64-linux ~x86-linux"
+	if [[ ${PV} != *_rc* ]] ; then
+		KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 -sparc ~x86 ~amd64-linux ~x86-linux"
+	fi
 fi
 
 [[ ${LIBUNWIND_DOCS_PREBUILT} == 1 ]] && LIBUNWIND_DOCS_USEFLAG="doc"


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/
@ 2024-01-02  6:32 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2024-01-02  6:32 UTC (permalink / raw
  To: gentoo-commits

commit:     3ec6937fc69c5abd9d2fb1d7488115e3372ee96c
Author:     Matoro Mahri <matoro_gentoo <AT> matoro <DOT> tk>
AuthorDate: Fri Dec 29 22:24:07 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan  2 06:31:46 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ec6937f

sys-libs/libunwind: backport patch to fix build on ppc

See: https://github.com/libunwind/libunwind/issues/520
See: https://github.com/libunwind/libunwind/pull/521
Bug: https://bugs.gentoo.org/913817
Signed-off-by: Matoro Mahri <matoro_gentoo <AT> matoro.tk>
Closes: https://github.com/gentoo/gentoo/pull/34554
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libunwind-1.7.2-backport-pr521.patch     | 31 ++++++++++++++++++++++
 sys-libs/libunwind/libunwind-1.7.2.ebuild          |  2 ++
 2 files changed, 33 insertions(+)

diff --git a/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch b/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch
new file mode 100644
index 000000000000..addfc0a60a03
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch
@@ -0,0 +1,31 @@
+https://bugs.gentoo.org/913817
+https://github.com/libunwind/libunwind/issues/520
+https://github.com/libunwind/libunwind/pull/521
+
+From aaf9909c91f1fa875907df8d437bff689e00172e Mon Sep 17 00:00:00 2001
+From: Stephen Webb <swebb@blackberry.com>
+Date: Fri, 26 May 2023 16:22:08 -0400
+Subject: [PATCH] Fix FTBFS on Linux ppc32
+
+Looks like the Linux ucontext structure has changed for PPC at some
+point. This probably needs some kind of version check, or else ancient
+kernels will need to stick with 1.6 or earlier.
+---
+ src/ppc32/ucontext_i.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h
+index 64f8ed878..ee93c6979 100644
+--- a/src/ppc32/ucontext_i.h
++++ b/src/ppc32/ucontext_i.h
+@@ -44,8 +44,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ //#define MQ_IDX                36
+ #define LINK_IDX        36
+ 
+-#define _UC_MCONTEXT_GPR(x) ( (void *)&dmy_ctxt.uc_mcontext.gregs[x] - (void *)&dmy_ctxt) )
+-#define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.fpregs[x] - (void *)&dmy_ctxt) )
++#define _UC_MCONTEXT_GPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[x] - (void *)&dmy_ctxt) )
++#define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[x] - (void *)&dmy_ctxt) )
+ 
+ /* These are dummy structures used only for obtaining the offsets of the
+    various structure members. */

diff --git a/sys-libs/libunwind/libunwind-1.7.2.ebuild b/sys-libs/libunwind/libunwind-1.7.2.ebuild
index e5cd9a5f96e9..4f420b007d09 100644
--- a/sys-libs/libunwind/libunwind-1.7.2.ebuild
+++ b/sys-libs/libunwind/libunwind-1.7.2.ebuild
@@ -53,6 +53,8 @@ DEPEND="
 	libatomic? ( dev-libs/libatomic_ops[${MULTILIB_USEDEP}] )
 "
 
+PATCHES=( "${FILESDIR}/${PN}-1.7.2-backport-pr521.patch" )
+
 MULTILIB_WRAPPED_HEADERS=(
 	/usr/include/libunwind.h
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-02  6:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-13 21:38 [gentoo-commits] repo/gentoo:master commit in: sys-libs/libunwind/, sys-libs/libunwind/files/ Sergei Trofimovich
  -- strict thread matches above, loose matches on Subject: below --
2024-01-02  6:32 Sam James
2023-12-02 21:22 Sam James
2022-05-04  5:41 Sam James
2021-11-27 14:39 Sam James
2018-07-25 19:36 Sergei Trofimovich
2018-07-08 10:00 Sergei Trofimovich
2017-02-14  2:51 Mike Frysinger
2016-06-13 18:13 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox