1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-04 14:09:47 +00:00

libunwind: Upgrade to 1.2rc1+

This helps in compiling with gcc6
drop patches backported to 1.1
remove musl conditional patches, they should work
on glibc too now

(From OE-Core rev: d164b4dbcbba4dd7db4c4257e6cd876026c2e7eb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2016-05-11 10:35:24 -07:00
committed by Richard Purdie
parent 08a9f5dec6
commit ca8ae667ac
12 changed files with 37 additions and 2776 deletions
@@ -1,29 +0,0 @@
From 396b6c7ab737e2bff244d640601c436a26260ca1 Mon Sep 17 00:00:00 2001
From: Arun Sharma <arun@sharma-home.net>
Date: Fri, 19 Jun 2015 19:47:22 -0700
Subject: [PATCH] Invalid dwarf opcodes can cause references beyond the end of
the array.
Upstream-Status: backport
Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
include/dwarf_i.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/dwarf_i.h b/include/dwarf_i.h
index 1e6231e..4a02a7d 100644
--- a/include/dwarf_i.h
+++ b/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
--
1.7.9.5
@@ -1,31 +0,0 @@
From b07435a90bd636ee718e2238fb46c74a6dd5e069 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 22 Mar 2016 16:41:13 +0000
Subject: [PATCH] disable tests
Tests use getcontext() API which is
not there on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Inappropriate [MUSL-only]
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index e24fe1e..15380e4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,7 @@ endif
nodist_include_HEADERS = include/libunwind-common.h
-SUBDIRS = src tests doc
+SUBDIRS = src doc
noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
include/compiler.h include/libunwind_i.h include/mempool.h \
--
1.8.3.1
File diff suppressed because it is too large Load Diff
@@ -1,28 +0,0 @@
Fix test case link failure on PowerPC systems with Altivec
Upstream-Status:backport
On systems where the system compiler supports Altivec by default,
the libunwind Makefile will attempt to build an extra test case
ppc64-test-altivec. Unfortunately, the link step will fail since
the Makefile does not actually link against the libunwind library.
Fixed by adding the appropriate LDADD macro.
Signed-off-by: Ulrich Weigand <address@hidden>
---
tests/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0e30536..9c76628 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -201,3 +201,4 @@ Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
ia64_test_dyn1_LDADD = $(LIBUNWIND)
ia64_test_sig_LDADD = $(LIBUNWIND)
+ppc64_test_altivec_LDADD = $(LIBUNWIND)
--
1.8.5
@@ -1,42 +0,0 @@
From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
From: Thierry Reding <treding@nvidia.com>
Date: Fri, 27 Jun 2014 08:40:33 +0200
Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
example, libgcc_s.so.1 contains some symbols needed by libunwind which
are not present in libgcc.
This causes the following link error when building the X.Org X server
with libunwind support:
CCLD Xorg
/usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
/usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
Linking against libgcc_s explicitly solves this problem.
Upstream-Status: Backport
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index cffe19b..3beb5f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,7 +258,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __INTEL_COMPILER
if test x$GCC = xyes -a x$intel_compiler != xyes; then
CFLAGS="${CFLAGS} -fexceptions -Wall -Wsign-compare"
- LIBCRTS="-lgcc"
+ LIBCRTS="-lgcc_s"
fi
AC_MSG_RESULT([$intel_compiler])
--
2.3.2
@@ -1,72 +0,0 @@
From 10b064ffe902d5af31bb49bd8e4f03c545f8d462 Mon Sep 17 00:00:00 2001
From: Ladislav Michl <ladis@linux-mips.org>
Date: Tue, 13 Nov 2012 11:19:47 +0100
Subject: [PATCH] Support building with older compilers.
Add a check for __builtin_unreachable.
Upstream-Status: Pending
---
configure.ac | 11 +++++++++++
include/libunwind_i.h | 6 ++++++
src/arm/Gresume.c | 2 +-
src/sh/Gresume.c | 2 +-
4 files changed, 19 insertions(+), 2 deletions(-)
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache =
fi
AC_MSG_RESULT([$have__builtin___clear_cache])
+AC_MSG_CHECKING([for __builtin_unreachable])
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])],
+ [have__builtin_unreachable=yes],
+ [have__builtin_unreachable=no])
+if test x$have__builtin_unreachable = xyes; then
+ AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1],
+ [Defined if __builtin_unreachable() is available])
+fi
+AC_MSG_RESULT([$have__builtin_unreachable])
+
AC_MSG_CHECKING([for __sync atomics])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]], [[
--- a/include/libunwind_i.h
+++ b/include/libunwind_i.h
@@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
# endif
#endif
+#if defined(HAVE__BUILTIN_UNREACHABLE)
+# define unreachable() __builtin_unreachable()
+#else
+# define unreachable() do { } while (1)
+#endif
+
#ifdef DEBUG
# define UNW_DEBUG 1
#else
--- a/src/arm/Gresume.c
+++ b/src/arm/Gresume.c
@@ -96,7 +96,7 @@ arm_local_resume (unw_addr_space_t as, u
: : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
);
}
- __builtin_unreachable();
+ unreachable();
#else
printf ("%s: implement me\n", __FUNCTION__);
#endif
--- a/src/sh/Gresume.c
+++ b/src/sh/Gresume.c
@@ -109,7 +109,7 @@ sh_local_resume (unw_addr_space_t as, un
"r" (c->sigcontext_pc)
);
}
- __builtin_unreachable();
+ unreachable();
#endif
return -UNW_EINVAL;
}
@@ -15,23 +15,17 @@ Upstream-Status: Pending
src/mips/getcontext.S | 3 +--
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h
index 3c95a2a..80acc15 100644
--- a/src/coredump/_UCD_internal.h
+++ b/src/coredump/_UCD_internal.h
@@ -34,6 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#ifdef HAVE_SYS_PROCFS_H
#include <sys/procfs.h> /* struct elf_prstatus */
#endif
+#include <sys/reg.h>
#include <errno.h>
#include <string.h>
#include <limits.h>
@@ -44,6 +45,39 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
Index: git/src/coredump/_UCD_internal.h
===================================================================
--- git.orig/src/coredump/_UCD_internal.h
+++ git/src/coredump/_UCD_internal.h
@@ -44,6 +44,41 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
#include "libunwind_i.h"
+#ifndef __GLIBC__
+#include <sys/reg.h>
+
+#define EF_REG0 6
+#define EF_REG1 7
+#define EF_REG2 8
@@ -67,11 +61,11 @@ index 3c95a2a..80acc15 100644
#if SIZEOF_OFF_T == 4
typedef uint32_t uoff_t;
diff --git a/src/mips/getcontext.S b/src/mips/getcontext.S
index d1dbd57..de9b681 100644
--- a/src/mips/getcontext.S
+++ b/src/mips/getcontext.S
@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
Index: git/src/mips/getcontext.S
===================================================================
--- git.orig/src/mips/getcontext.S
+++ git/src/mips/getcontext.S
@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
#include "offsets.h"
@@ -85,6 +79,3 @@ index d1dbd57..de9b681 100644
# define OFFSET 4
# else
# define OFFSET 0
--
1.8.3.1
@@ -1,24 +0,0 @@
require libunwind.inc
SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
file://Support-building-with-older-compilers.patch \
file://AArch64-port.patch \
file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \
file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
file://0001-aarch64-introduce-build-support-for-aarch64_be-targe.patch \
file://0002-aarch64-fix-wrong-big_endian-flag-in-aarch64_be-case.patch \
"
SRC_URI_append_libc-musl = "\
file://0001-x86-Stub-out-x86_local_resume.patch \
file://0001-disable-tests.patch \
file://0001-Fix-build-on-mips-musl.patch \
"
SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"
# http://errors.yoctoproject.org/Errors/Details/20487/
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
@@ -0,0 +1,25 @@
require libunwind.inc
PV = "1.1+git${SRCPV}"
SRCREV = "bc8698fd7ed13a629a8ec3cb2a89bd74f9d8b5c0"
SRC_URI = "git://git.sv.gnu.org/libunwind.git \
file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
file://0001-x86-Stub-out-x86_local_resume.patch \
file://0001-Fix-build-on-mips-musl.patch \
"
EXTRA_OECONF_append_libc-musl = " --disable-documentation"
# http://errors.yoctoproject.org/Errors/Details/20487/
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
# see https://sourceware.org/bugzilla/show_bug.cgi?id=19987
SECURITY_CFLAGS_remove_aarch64 = "-fpie"
SECURITY_CFLAGS_append_aarch64 = " -fPIE"
S = "${WORKDIR}/git"