summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-libs/libunwind
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-libs/libunwind')
-rw-r--r--sys-libs/libunwind/Manifest3
-rw-r--r--sys-libs/libunwind/files/libunwind-0.99-disable-setjmp.patch213
-rw-r--r--sys-libs/libunwind/files/libunwind-0.99-implicit-declaration.patch17
-rw-r--r--sys-libs/libunwind/files/libunwind-1.0.1-disable-setjmp.patch37
-rw-r--r--sys-libs/libunwind/files/libunwind-1.0.1-ia64.patch133
-rw-r--r--sys-libs/libunwind/files/libunwind-1.1-lzma.patch63
-rw-r--r--sys-libs/libunwind/libunwind-0.99-r1.ebuild38
-rw-r--r--sys-libs/libunwind/libunwind-1.0.1-r1.ebuild60
-rw-r--r--sys-libs/libunwind/libunwind-1.0.1.ebuild50
-rw-r--r--sys-libs/libunwind/libunwind-1.1.ebuild70
-rw-r--r--sys-libs/libunwind/metadata.xml9
11 files changed, 693 insertions, 0 deletions
diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest
new file mode 100644
index 000000000000..fa690d83e6cf
--- /dev/null
+++ b/sys-libs/libunwind/Manifest
@@ -0,0 +1,3 @@
+DIST libunwind-0.99.tar.gz 711817 SHA256 56083aae17eab3ccb7a36b95f0430f5a5f258755bf193bb5ca4fd4b918356164 SHA512 26796c546490c3065d04e2143b8a4a7bcc3d3d8fc0c1c8bc1da1ddfb6abc0807d994fe83f008e82ba7cb78525d6fe66800aafa266e931a6aef9813283f904daf WHIRLPOOL 868cf12c71fb1ca64da185e3e804bcddfafd70f8c443c7ca5684f9fa99f1a1943bb75cc4137082a5bd3865a6aeea39c1b2ad68d62db261d14164afded8f0ee3e
+DIST libunwind-1.0.1.tar.gz 1028725 SHA256 aa95fd184c0b90d95891c2f3bac2c7df708ff016d2a6ee8b2eabb769f864101f SHA512 e360f0c0abf1e8b153a01cf522237495cecd9b4c689fa55868e60cec86f650e86ceefa283c045fa3d4bd50dc130e75ce7a8ad221c8f938c20a56f106aa3de8c5 WHIRLPOOL 0a2bcfdabb97cb541f7050203db4b658d0b853fdeb504e5917a731547a673e78db9ea0a64ee17ffc137017fc474c7ba44086fdbf2f5f3519993b5bd0048c76b4
+DIST libunwind-1.1.tar.gz 1098603 SHA256 9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a SHA512 bfe04f2bfac9f9e47c37f0b23ed2f264d8d3d3d6f1392fe9d794ee13cad216b3740979e922e4276fb65c1ccdc836fce48812cb5459ecdd2a89a621036a35d7c1 WHIRLPOOL 1a0e566edf92c0563cb5525203f2718c3454bc0be25ec8079cde8441de08b6d8951db7cbf2f0a02a4a0f1e6c350e74e551a482d9094996daefa216a79bc9d383
diff --git a/sys-libs/libunwind/files/libunwind-0.99-disable-setjmp.patch b/sys-libs/libunwind/files/libunwind-0.99-disable-setjmp.patch
new file mode 100644
index 000000000000..698d2acff816
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-0.99-disable-setjmp.patch
@@ -0,0 +1,213 @@
+http://cvs.fedoraproject.org/viewvc/rpms/libunwind/devel/libunwind-disable-setjmp.patch?revision=1.1&view=markup
+http://bugs.gentoo.org/show_bug.cgi?id=299344
+
+At least x86_64 version cannot work, src/setjmp/setjmp.c and
+src/setjmp/sigsetjmp.c are not even compiled, src/x86_64/longjmp.S does not
+match src/setjmp/setjmp.c + include/tdep-x86_64/jmpbuf.h .
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -12,7 +12,7 @@ lib_LTLIBRARIES_cdep_setjmp =
+ else
+ LIBRARIES_cdep = libunwind-ptrace.a
+ lib_LTLIBRARIES_cdep = libunwind.la
+-lib_LTLIBRARIES_cdep_setjmp = libunwind-setjmp.la
++lib_LTLIBRARIES_cdep_setjmp = #libunwind-setjmp.la
+ endif
+
+ ### libunwind-ptrace:
+@@ -27,21 +27,21 @@ libunwind_ptrace_a_SOURCES = \
+ ptrace/_UPT_reg_offset.c ptrace/_UPT_resume.c
+
+ ### libunwind-setjmp:
+-libunwind_setjmp_la_LDFLAGS = $(COMMON_SO_LDFLAGS) \
+- -version-info $(SETJMP_SO_VERSION)
+-libunwind_setjmp_la_LIBADD = libunwind-$(arch).la -lc
+-libunwind_setjmp_la_SOURCES_common = setjmp/setjmp_i.h \
+- setjmp/longjmp.c \
+- setjmp/siglongjmp.c
+-libunwind_setjmp_la_SOURCES_arm = arm/siglongjmp.S
+-libunwind_setjmp_la_SOURCES_ia64 = ia64/setjmp.S ia64/sigsetjmp.S \
+- ia64/longjmp.S ia64/siglongjmp.S
+-libunwind_setjmp_la_SOURCES_hppa = hppa/siglongjmp.S
+-libunwind_setjmp_la_SOURCES_mips = mips/siglongjmp.S
+-libunwind_setjmp_la_SOURCES_x86 = x86/longjmp.S x86/siglongjmp.S
+-libunwind_setjmp_la_SOURCES_x86_64 = x86_64/longjmp.S x86_64/siglongjmp.S
+-libunwind_setjmp_la_SOURCES_ppc64 = ppc/longjmp.S ppc/siglongjmp.S
+-libunwind_setjmp_la_SOURCES_ppc32 = ppc/longjmp.S ppc/siglongjmp.S
++#libunwind_setjmp_la_LDFLAGS = $(COMMON_SO_LDFLAGS) \
++# -version-info $(SETJMP_SO_VERSION)
++#libunwind_setjmp_la_LIBADD = libunwind-$(arch).la -lc
++#libunwind_setjmp_la_SOURCES_common = setjmp/setjmp_i.h \
++# setjmp/longjmp.c \
++# setjmp/siglongjmp.c
++#libunwind_setjmp_la_SOURCES_arm = arm/siglongjmp.S
++#libunwind_setjmp_la_SOURCES_ia64 = ia64/setjmp.S ia64/sigsetjmp.S \
++# ia64/longjmp.S ia64/siglongjmp.S
++#libunwind_setjmp_la_SOURCES_hppa = hppa/siglongjmp.S
++#libunwind_setjmp_la_SOURCES_mips = mips/siglongjmp.S
++#libunwind_setjmp_la_SOURCES_x86 = x86/longjmp.S x86/siglongjmp.S
++#libunwind_setjmp_la_SOURCES_x86_64 = x86_64/longjmp.S x86_64/siglongjmp.S
++#libunwind_setjmp_la_SOURCES_ppc64 = ppc/longjmp.S ppc/siglongjmp.S
++#libunwind_setjmp_la_SOURCES_ppc32 = ppc/longjmp.S ppc/siglongjmp.S
+
+ ### libunwind:
+
+@@ -359,8 +359,8 @@ if ARCH_ARM
+ if !REMOTE_ONLY
+ libunwind_arm_la_LIBADD = libunwind.la -lc
+ endif
+- libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_arm)
++# libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_arm)
+ else
+ if ARCH_IA64
+ ia64_mk_Gcursor_i_SOURCES = ia64/mk_Gcursor_i.c
+@@ -378,8 +378,8 @@ Lcursor_i.h: ia64/mk_Lcursor_i
+ if !REMOTE_ONLY
+ libunwind_ia64_la_LIBADD = libunwind.la -lc
+ endif
+- libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_ia64)
++# libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_ia64)
+ else
+ if ARCH_HPPA
+ lib_LTLIBRARIES_arch = libunwind-hppa.la
+@@ -389,8 +389,8 @@ if ARCH_HPPA
+ if !REMOTE_ONLY
+ libunwind_hppa_la_LIBADD = libunwind.la -lc
+ endif
+- libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_hppa)
++# libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_hppa)
+ else
+ if ARCH_MIPS
+ lib_LTLIBRARIES_arch = libunwind-mips.la
+@@ -400,8 +400,8 @@ if ARCH_MIPS
+ if !REMOTE_ONLY
+ libunwind_mips_la_LIBADD = libunwind.la -lc
+ endif
+- libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_mips)
++# libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_mips)
+ else
+ if ARCH_X86
+ lib_LTLIBRARIES_arch = libunwind-x86.la
+@@ -411,8 +411,8 @@ if ARCH_X86
+ if !REMOTE_ONLY
+ libunwind_x86_la_LIBADD = libunwind.la -lc
+ endif
+- libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_x86)
++# libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_x86)
+ else
+ if ARCH_X86_64
+ lib_LTLIBRARIES_arch = libunwind-x86_64.la
+@@ -422,8 +422,8 @@ if ARCH_X86_64
+ if !REMOTE_ONLY
+ libunwind_x86_64_la_LIBADD = libunwind.la -lc
+ endif
+- libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_x86_64)
++# libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_x86_64)
+ else
+ if ARCH_PPC32
+ lib_LTLIBRARIES_arch = libunwind-ppc32.la
+@@ -433,8 +433,8 @@ if ARCH_PPC32
+ if !REMOTE_ONLY
+ libunwind_ppc32_la_LIBADD = libunwind.la -lc
+ endif
+- libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_ppc32)
++# libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_ppc32)
+ else
+ if ARCH_PPC64
+ lib_LTLIBRARIES_arch = libunwind-ppc64.la
+@@ -444,8 +444,8 @@ if ARCH_PPC64
+ if !REMOTE_ONLY
+ libunwind_ppc64_la_LIBADD = libunwind.la -lc
+ endif
+- libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_ppc64)
++# libunwind_setjmp_la_SOURCES = $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_ppc64)
+
+ endif # ARCH_PPC64
+ endif # ARCH_PPC32
+@@ -466,7 +466,7 @@ libunwind_la_LIBADD = -lc $(LIBCRTS)
+
+ lib_LIBRARIES = $(LIBRARIES_cdep)
+ lib_LTLIBRARIES = $(lib_LTLIBRARIES_cdep) $(lib_LTLIBRARIES_arch) \
+- $(lib_LTLIBRARIES_cdep_setjmp)
++ # $(lib_LTLIBRARIES_cdep_setjmp)
+
+ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/include/tdep-$(arch) -I.
+ AM_CCASFLAGS = $(AM_CPPFLAGS)
+@@ -488,16 +488,16 @@ EXTRA_DIST = elfxx.h elfxx.c unwind/unwind-internal.h \
+ $(libunwind_mips_la_SOURCES_mips) \
+ $(libunwind_x86_la_SOURCES_x86) \
+ $(libunwind_x86_64_la_SOURCES_x86_64) \
+- $(libunwind_ptrace_a_SOURCES) \
+- $(libunwind_setjmp_la_SOURCES_common) \
+- $(libunwind_setjmp_la_SOURCES_arm) \
+- $(libunwind_setjmp_la_SOURCES_hppa) \
+- $(libunwind_setjmp_la_SOURCES_ia64) \
+- $(libunwind_setjmp_la_SOURCES_mips) \
+- $(libunwind_setjmp_la_SOURCES_x86) \
+- $(libunwind_setjmp_la_SOURCES_x86_64) \
+- $(libunwind_setjmp_la_SOURCES_ppc32) \
+- $(libunwind_setjmp_la_SOURCES_ppc64)
++ $(libunwind_ptrace_a_SOURCES)
++# $(libunwind_setjmp_la_SOURCES_common) \
++# $(libunwind_setjmp_la_SOURCES_arm) \
++# $(libunwind_setjmp_la_SOURCES_hppa) \
++# $(libunwind_setjmp_la_SOURCES_ia64) \
++# $(libunwind_setjmp_la_SOURCES_mips) \
++# $(libunwind_setjmp_la_SOURCES_x86) \
++# $(libunwind_setjmp_la_SOURCES_x86_64) \
++# $(libunwind_setjmp_la_SOURCES_ppc32) \
++# $(libunwind_setjmp_la_SOURCES_ppc64)
+
+
+ # The -version-info flag accepts an argument of the form
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -24,7 +24,8 @@ if ARCH_IA64
+ Gia64-test-nat Lia64-test-nat \
+ Gia64-test-rbs Lia64-test-rbs \
+ Gia64-test-readonly Lia64-test-readonly \
+- ia64-test-setjmp ia64-test-sig
++ ia64-test-sig
++# ia64-test-setjmp
+ else
+ if ARCH_PPC64
+ if USE_ALTIVEC
+@@ -40,8 +41,9 @@ endif #ARCH_IA64
+ Gtest-resume-sig Ltest-resume-sig \
+ Gtest-dyn1 Ltest-dyn1 \
+ test-async-sig test-flush-cache test-init-remote \
+- test-mem test-setjmp test-ptrace \
++ test-mem test-ptrace \
+ Ltest-nomalloc
++# test-setjmp
+ noinst_PROGRAMS_cdep = forker mapper test-ptrace-misc test-varargs \
+ Gperf-simple Lperf-simple
+
+@@ -93,8 +95,8 @@ test_ptrace_misc_SOURCES = test-ptrace-misc.c ident.c
+ LIBUNWIND = ../src/libunwind-$(arch).la $(LIBUNWIND_local)
+ LDADD = $(LIBUNWIND)
+
+-test_setjmp_LDADD = ../src/libunwind-setjmp.la $(LIBUNWIND_local)
+-ia64_test_setjmp_LDADD = ../src/libunwind-setjmp.la $(LIBUNWIND_local)
++# test_setjmp_LDADD = ../src/libunwind-setjmp.la $(LIBUNWIND_local)
++# ia64_test_setjmp_LDADD = ../src/libunwind-setjmp.la $(LIBUNWIND_local)
+ test_ptrace_LDADD = ../src/libunwind-ptrace.a $(LIBUNWIND)
+ Ltest_concurrent_LDADD = $(LIBUNWIND) -lpthread
+ Gtest_concurrent_LDADD = $(LIBUNWIND) -lpthread
diff --git a/sys-libs/libunwind/files/libunwind-0.99-implicit-declaration.patch b/sys-libs/libunwind/files/libunwind-0.99-implicit-declaration.patch
new file mode 100644
index 000000000000..6387f0a889c7
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-0.99-implicit-declaration.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/show_bug.cgi?id=289445#c2
+
+--- src/x86_64/unwind_i.h
++++ src/x86_64/unwind_i.h
+@@ -65,6 +65,12 @@
+ extern void x86_64_local_addr_space_init (void);
+ extern int x86_64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
+ void *arg);
++
++/* implemented in setcontext.S */
++#if defined(__linux)
++extern int _Ux86_64_setcontext (const ucontext_t *ucp);
++#endif
++
+ #if 0
+ extern dwarf_loc_t x86_64_scratch_loc (struct cursor *c, unw_regnum_t reg);
+ #endif
diff --git a/sys-libs/libunwind/files/libunwind-1.0.1-disable-setjmp.patch b/sys-libs/libunwind/files/libunwind-1.0.1-disable-setjmp.patch
new file mode 100644
index 000000000000..442a5dfd7a37
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.0.1-disable-setjmp.patch
@@ -0,0 +1,37 @@
+http://cvs.fedoraproject.org/viewvc/rpms/libunwind/devel/libunwind-disable-setjmp.patch?revision=1.1&view=markup
+http://bugs.gentoo.org/299344
+
+At least x86_64 version cannot work, src/setjmp/setjmp.c and
+src/setjmp/sigsetjmp.c are not even compiled, src/x86_64/longjmp.S does not
+match src/setjmp/setjmp.c + include/tdep-x86_64/jmpbuf.h .
+
+--- libunwind-1.0.1/src/Makefile.am
++++ libunwind-1.0.1/src/Makefile.am
+@@ -9,6 +9,3 @@
+ # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added
+ # at the end.
+-if !REMOTE_ONLY
+-lib_LTLIBRARIES += libunwind-setjmp.la
+-endif
+
+ #
+--- libunwind-1.0.1/tests/Makefile.am
++++ libunwind-1.0.1/tests/Makefile.am
+@@ -27,7 +27,7 @@
+ Gia64-test-nat Lia64-test-nat \
+ Gia64-test-rbs Lia64-test-rbs \
+ Gia64-test-readonly Lia64-test-readonly \
+- ia64-test-setjmp ia64-test-sig
++ ia64-test-sig
+ else
+ if ARCH_PPC64
+ if USE_ALTIVEC
+@@ -44,7 +44,7 @@
+ Gtest-dyn1 Ltest-dyn1 \
+ Gtest-trace Ltest-trace \
+ test-async-sig test-flush-cache test-init-remote \
+- test-mem test-setjmp test-ptrace \
++ test-mem test-ptrace \
+ Ltest-nomalloc Ltest-nocalloc rs-race
+ noinst_PROGRAMS_cdep = forker mapper test-ptrace-misc \
+ Gperf-simple Lperf-simple
diff --git a/sys-libs/libunwind/files/libunwind-1.0.1-ia64.patch b/sys-libs/libunwind/files/libunwind-1.0.1-ia64.patch
new file mode 100644
index 000000000000..0639e64e8a91
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.0.1-ia64.patch
@@ -0,0 +1,133 @@
+fix from upstream for building on ia64
+
+https://bugs.gentoo.org/425736
+
+From 197571915c70b9ccd0978c13f12acb2a5f3058d4 Mon Sep 17 00:00:00 2001
+From: Ken Werner <ken.werner@linaro.org>
+Date: Tue, 11 Oct 2011 15:13:35 +0200
+Subject: [PATCH] Change _UPTi_find_unwind_table to return an integer.
+
+This keeps the definition on IA64 and all the other architectures in sync with
+the declaration of _UPTi_find_unwind_table. This also mimics the behaviour of
+what's done for local unwinding and allows the function to provide more than
+one way to undwind.
+
+Signed-off-by: Ken Werner <ken.werner@linaro.org>
+---
+ src/ptrace/_UPT_find_proc_info.c | 8 ++++----
+ src/ptrace/_UPT_get_dyn_info_list_addr.c | 6 ++----
+ src/ptrace/_UPT_internal.h | 2 +-
+ 3 files changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/src/ptrace/_UPT_find_proc_info.c b/src/ptrace/_UPT_find_proc_info.c
+index 44feb34..7aaa0c2 100644
+--- a/src/ptrace/_UPT_find_proc_info.c
++++ b/src/ptrace/_UPT_find_proc_info.c
+@@ -95,7 +95,7 @@ find_gp (struct UPT_info *ui, Elf64_Phdr *pdyn, Elf64_Addr load_base)
+ return gp;
+ }
+
+-HIDDEN unw_dyn_info_t *
++HIDDEN int
+ _UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as,
+ char *path, unw_word_t segbase, unw_word_t mapoff,
+ unw_word_t ip)
+@@ -105,7 +105,7 @@ _UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as,
+ int i;
+
+ if (!_Uelf64_valid_object (&ui->ei))
+- return NULL;
++ return -UNW_ENOINFO;
+
+ ehdr = ui->ei.image;
+ phdr = (Elf64_Phdr *) ((char *) ui->ei.image + ehdr->e_phoff);
+@@ -132,7 +132,7 @@ _UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as,
+ }
+ }
+ if (!ptxt || !punw)
+- return NULL;
++ return 0;
+
+ ui->di_cache.start_ip = segbase;
+ ui->di_cache.end_ip = ui->di_cache.start_ip + ptxt->p_memsz;
+@@ -143,7 +143,7 @@ _UPTi_find_unwind_table (struct UPT_info *ui, unw_addr_space_t as,
+ ui->di_cache.u.ti.table_len = punw->p_memsz / sizeof (unw_word_t);
+ ui->di_cache.u.ti.table_data = (unw_word_t *)
+ ((char *) ui->ei.image + (punw->p_vaddr - ptxt->p_vaddr));
+- return &ui->di_cache;
++ return 1;
+ }
+
+ #elif UNW_TARGET_X86 || UNW_TARGET_X86_64 || UNW_TARGET_HPPA \
+
+From 962366dace4fed902ad5e89df1b34c13c3224b8b Mon Sep 17 00:00:00 2001
+From: Arun Sharma <asharma@fb.com>
+Date: Fri, 23 Sep 2011 11:11:34 -0700
+Subject: [PATCH] Fixup compile errors on ia64.
+
+Suggested-by: Harald Servat <harald.servat@bsc.es>
+---
+ src/ptrace/_UPT_get_dyn_info_list_addr.c | 2 +-
+ src/ptrace/_UPT_internal.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ptrace/_UPT_get_dyn_info_list_addr.c b/src/ptrace/_UPT_get_dyn_info_list_addr.c
+index d82d4e4..ba9c795 100644
+--- a/src/ptrace/_UPT_get_dyn_info_list_addr.c
++++ b/src/ptrace/_UPT_get_dyn_info_list_addr.c
+@@ -62,7 +62,7 @@ get_list_addr (unw_addr_space_t as, unw_word_t *dil_addr, void *arg,
+
+ Debug (16, "checking object %s\n", path);
+
+- di = _UPTi_find_unwind_table (ui, as, path, lo, off);
++ di = _UPTi_find_unwind_table (ui, as, path, lo, off, 0);
+ if (di)
+ {
+ res = _Uia64_find_dyn_list (as, di, arg);
+From d93d96ad833390519ea68a2df22dd55dd26a3214 Mon Sep 17 00:00:00 2001
+From: Martin Milata <mmilata@redhat.com>
+Date: Tue, 22 May 2012 11:51:06 +0200
+Subject: [PATCH] Fix compilation on IA64
+
+ - Add tdep macro for {dwarf,ia64}_find_unwind_table so that ia64
+ doesn't try to use dwarf code.
+ - Fix extraneous #if.
+ - Fix mistyped filename in Makefile.am.
+ - Link ia64-specific tests with correct libraries.
+
+Signed-off-by: Martin Milata <mmilata@redhat.com>
+---
+ include/tdep-arm/libunwind_i.h | 1 +
+ include/tdep-hppa/libunwind_i.h | 1 +
+ include/tdep-ia64/libunwind_i.h | 1 +
+ include/tdep-mips/libunwind_i.h | 1 +
+ include/tdep-ppc32/libunwind_i.h | 1 +
+ include/tdep-ppc64/libunwind_i.h | 1 +
+ include/tdep-x86/libunwind_i.h | 1 +
+ include/tdep-x86_64/libunwind_i.h | 1 +
+ src/Makefile.am | 4 ++--
+ src/ia64/Gfind_unwind_table.c | 3 ---
+ src/ptrace/_UPT_find_proc_info.c | 2 +-
+ src/ptrace/_UPT_get_dyn_info_list_addr.c | 2 +-
+ tests/Makefile.am | 11 +++++++++++
+ 13 files changed, 23 insertions(+), 7 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 26e7987..4b3bce3 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -165,3 +165,14 @@ test_setjmp_LDADD = $(LIBUNWIND_setjmp)
+ test_setjmp_LDADD = $(LIBUNWIND_setjmp)
+ ia64_test_setjmp_LDADD = $(LIBUNWIND_setjmp)
+
++
++Gia64_test_nat_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
++Gia64_test_stack_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
++Gia64_test_rbs_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
++Gia64_test_readonly_LDADD = $(LIBUNWIND) $(LIBUNWIND_local)
++Lia64_test_nat_LDADD = $(LIBUNWIND_local)
++Lia64_test_stack_LDADD = $(LIBUNWIND_local)
++Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
++Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
++ia64_test_dyn1_LDADD = $(LIBUNWIND)
++ia64_test_sig_LDADD = $(LIBUNWIND)
diff --git a/sys-libs/libunwind/files/libunwind-1.1-lzma.patch b/sys-libs/libunwind/files/libunwind-1.1-lzma.patch
new file mode 100644
index 000000000000..09cefa028539
--- /dev/null
+++ b/sys-libs/libunwind/files/libunwind-1.1-lzma.patch
@@ -0,0 +1,63 @@
+From 38c349bb000b427c376e756e3ecdb764a2b4d297 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 15 Feb 2014 21:00:59 -0500
+Subject: [PATCH] link sublibs against liblzma as needed
+
+The coredump/elf32/elf64/elfxx libs use lzma funcs but don't link against
+it. This produces sub-shared libs that don't link against lzma and can
+make the linker angry due to underlinking like so:
+
+libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=amdfam10 -pipe -g \
+ -frecord-gcc-switches -Wimplicit-function-declaration -fexceptions \
+ -Wall -Wsign-compare -Wl,-O1 -Wl,--hash-style=gnu \
+ -o .libs/test-coredump-unwind test-coredump-unwind.o \
+ ../src/.libs/libunwind-coredump.so ../src/.libs/libunwind-x86_64.so
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_footer_decode'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_buffer_decode'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_size'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_end'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_uncompressed_size'
+../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_buffer_decode'
+collect2: error: ld returned 1 exit status
+
+So add LIBLZMA to the right LIBADD for each of these libraries.
+
+URL: https://bugs.gentoo.org/444050
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ src/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -169,7 +169,7 @@ libunwind_arm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libunwind_arm_la_LDFLAGS) $(LDFLAGS) -o $@
+ @ARCH_ARM_TRUE@am_libunwind_arm_la_rpath = -rpath $(libdir)
+-libunwind_coredump_la_LIBADD =
++libunwind_coredump_la_LIBADD = $(LIBLZMA)
+ am__libunwind_coredump_la_SOURCES_DIST = coredump/_UCD_accessors.c \
+ coredump/_UCD_create.c coredump/_UCD_destroy.c \
+ coredump/_UCD_access_mem.c coredump/_UCD_elf_map_image.c \
+@@ -214,15 +214,15 @@ am_libunwind_dwarf_local_la_OBJECTS = dwarf/Lexpr.lo dwarf/Lfde.lo \
+ libunwind_dwarf_local_la_OBJECTS = \
+ $(am_libunwind_dwarf_local_la_OBJECTS)
+ @REMOTE_ONLY_FALSE@@USE_DWARF_TRUE@am_libunwind_dwarf_local_la_rpath =
+-libunwind_elf32_la_LIBADD =
++libunwind_elf32_la_LIBADD = $(LIBLZMA)
+ am_libunwind_elf32_la_OBJECTS = elf32.lo
+ libunwind_elf32_la_OBJECTS = $(am_libunwind_elf32_la_OBJECTS)
+ @USE_ELF32_TRUE@am_libunwind_elf32_la_rpath =
+-libunwind_elf64_la_LIBADD =
++libunwind_elf64_la_LIBADD = $(LIBLZMA)
+ am_libunwind_elf64_la_OBJECTS = elf64.lo
+ libunwind_elf64_la_OBJECTS = $(am_libunwind_elf64_la_OBJECTS)
+ @USE_ELF64_TRUE@am_libunwind_elf64_la_rpath =
+-libunwind_elfxx_la_LIBADD =
++libunwind_elfxx_la_LIBADD = $(LIBLZMA)
+ am_libunwind_elfxx_la_OBJECTS = elfxx.lo
+ libunwind_elfxx_la_OBJECTS = $(am_libunwind_elfxx_la_OBJECTS)
+ @USE_ELFXX_TRUE@am_libunwind_elfxx_la_rpath =
+--
+1.8.5.5
+
diff --git a/sys-libs/libunwind/libunwind-0.99-r1.ebuild b/sys-libs/libunwind/libunwind-0.99-r1.ebuild
new file mode 100644
index 000000000000..2fe29ac71f42
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-0.99-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
+HOMEPAGE="http://savannah.nongnu.org/projects/libunwind"
+SRC_URI="http://download.savannah.nongnu.org/releases/libunwind/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="7"
+KEYWORDS="amd64 ia64 x86"
+IUSE="static-libs"
+
+RESTRICT="test" # https://savannah.nongnu.org/bugs/?22368
+ # https://bugs.gentoo.org/273372
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-disable-setjmp.patch \
+ "${FILESDIR}"/${P}-implicit-declaration.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+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 || rm -f "${D}"usr/lib*/libunwind{-generic.a,*.la}
+}
diff --git a/sys-libs/libunwind/libunwind-1.0.1-r1.ebuild b/sys-libs/libunwind/libunwind-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..31cbfdd97035
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.0.1-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
+HOMEPAGE="http://savannah.nongnu.org/projects/libunwind"
+SRC_URI="http://download.savannah.nongnu.org/releases/libunwind/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="7"
+KEYWORDS="amd64 ~arm ia64 ~ppc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug debug-frame static-libs"
+
+# https://savannah.nongnu.org/bugs/?22368
+# https://bugs.gentoo.org/273372
+RESTRICT="test"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+QA_DT_NEEDED_x86_fbsd="usr/lib/libunwind.so.7.0.0"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.1-disable-setjmp.patch
+ epatch "${FILESDIR}"/${PN}-1.0.1-ia64.patch #425736
+ eautoreconf
+}
+
+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.
+ econf \
+ --enable-cxx-exceptions \
+ $(use_enable debug-frame) \
+ $(use_enable static-libs static) \
+ $(use_enable debug conservative_checks) \
+ $(use debug && echo --enable-debug)
+}
+
+src_test() {
+ # explicitly allow parallel build of tests
+ 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 || rm -f "${ED}"usr/lib*/libunwind{-generic.a,*.la}
+}
diff --git a/sys-libs/libunwind/libunwind-1.0.1.ebuild b/sys-libs/libunwind/libunwind-1.0.1.ebuild
new file mode 100644
index 000000000000..10cbbb4d0ff9
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.0.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Portable and efficient API to determine the call-chain of a program"
+HOMEPAGE="http://savannah.nongnu.org/projects/libunwind"
+SRC_URI="http://download.savannah.nongnu.org/releases/libunwind/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="7"
+KEYWORDS="~amd64 ~ia64 ~x86 ~x86-fbsd"
+IUSE="debug static-libs"
+
+# https://savannah.nongnu.org/bugs/?22368
+# https://bugs.gentoo.org/273372
+RESTRICT="test"
+
+DOCS=( AUTHORS ChangeLog NEWS README TODO )
+
+QA_DT_NEEDED_x86_fbsd="usr/lib/libunwind.so.7.0.0"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.1-disable-setjmp.patch
+ eautoreconf
+}
+
+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
+ econf \
+ $(use_enable static-libs static) \
+ $(use debug && echo --enable-debug)
+}
+
+src_test() {
+ # explicitly allow parallel build of tests
+ 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 || rm -f "${ED}"usr/lib*/libunwind{-generic.a,*.la}
+}
diff --git a/sys-libs/libunwind/libunwind-1.1.ebuild b/sys-libs/libunwind/libunwind-1.1.ebuild
new file mode 100644
index 000000000000..e4a0222fec8c
--- /dev/null
+++ b/sys-libs/libunwind/libunwind-1.1.ebuild
@@ -0,0 +1,70 @@
+# 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="http://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
+
+ sed -i -e '/LIBLZMA/s:-lzma:-llzma:' configure{.ac,} || die #444050
+ epatch "${FILESDIR}"/${P}-lzma.patch #444050
+ 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
+}
diff --git a/sys-libs/libunwind/metadata.xml b/sys-libs/libunwind/metadata.xml
new file mode 100644
index 000000000000..808179f059c8
--- /dev/null
+++ b/sys-libs/libunwind/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>toolchain</herd>
+ <use>
+ <flag name='debug-frame'>Adds support for DWARF .debug_frame section: Use the information from this section if available</flag>
+ <flag name='libatomic'>Use libatomic instead of builtin atomic operations</flag>
+ </use>
+</pkgmetadata>