summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libunwind
diff options
context:
space:
mode:
authorwangmy <wangmy@fujitsu.com>2021-11-29 22:59:51 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-01 16:22:03 +0000
commitfb4a298594e1722ab57cd312e391e6f7c5597f8a (patch)
tree858d2437de3fb798de5320c50de79142264a84bb /meta/recipes-support/libunwind
parent0640eb72ef4db97fc07011d8398dbafbd3c8b119 (diff)
downloadopenembedded-core-fb4a298594e1722ab57cd312e391e6f7c5597f8a.tar.gz
libunwind: upgrade 1.5.0 -> 1.6.0
0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch 0001-configure-Do-not-enforce-libdir-for-ppc64.patch removed since they're included in 1.6.0 refresh the following patches: 0003-x86-Stub-out-x86_local_resume.patch 0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch 0006-Fix-for-X32.patch Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libunwind')
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch62
-rw-r--r--meta/recipes-support/libunwind/libunwind/0001-configure-Do-not-enforce-libdir-for-ppc64.patch35
-rw-r--r--meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch19
-rw-r--r--meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch16
-rw-r--r--meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch13
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.6.0.bb (renamed from meta/recipes-support/libunwind/libunwind_1.5.0.bb)5
6 files changed, 23 insertions, 127 deletions
diff --git a/meta/recipes-support/libunwind/libunwind/0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/meta/recipes-support/libunwind/libunwind/0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
deleted file mode 100644
index 437b878365..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 599f10ac3a24e419a93f97fddbe14de01b1185ea Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Tue, 13 May 2014 23:32:27 +0200
-Subject: [PATCH 1/6] Add AO_REQUIRE_CAS to fix build on ARM < v6
-
-ARM earlier than ARMv6, such as ARMv4 and ARMv5 do not provide
-optimize atomic operations in libatomic_ops. Since libunwind is using
-such operations, it should define AO_REQUIRE_CAS before including
-<atomic_ops.h> so that libatomic_ops knows it should use emulated
-atomic operations instead (even though they are obviously a lot more
-expensive).
-
-Also, while real atomic operations are all inline functions and
-therefore linking against libatomic_ops was not required, the emulated
-atomic operations actually require linking against libatomic_ops, so
-the commented AC_CHECK_LIB test in acinclude.m4 is uncommented to make
-sure we link against libatomic_ops.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Upstream-Status: Pending
-Taken from:
-https://raw.githubusercontent.com/rdnetto/teapot-buildroot/master/package/libunwind/libunwind-02-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
-
----
- acinclude.m4 | 8 +-------
- include/libunwind_i.h | 1 +
- 2 files changed, 2 insertions(+), 7 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 497f7c2..9c15af1 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -22,11 +22,5 @@ fi])
- AC_DEFUN([CHECK_ATOMIC_OPS],
- [dnl Check whether the system has the atomic_ops package installed.
- AC_CHECK_HEADERS(atomic_ops.h)
--#
--# Don't link against libatomic_ops for now. We don't want libunwind
--# to depend on libatomic_ops.so. Fortunately, none of the platforms
--# we care about so far need libatomic_ops.a (everything is done via
--# inline macros).
--#
--# AC_CHECK_LIB(atomic_ops, main)
-+ AC_CHECK_LIB(atomic_ops, main)
- ])
-diff --git a/include/libunwind_i.h b/include/libunwind_i.h
-index 36cf7a1..33b4ca3 100644
---- a/include/libunwind_i.h
-+++ b/include/libunwind_i.h
-@@ -124,6 +124,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
- (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
-
- #ifdef HAVE_ATOMIC_OPS_H
-+# define AO_REQUIRE_CAS
- # include <atomic_ops.h>
- static inline int
- cmpxchg_ptr (void *addr, void *old, void *new)
---
-2.20.1
-
diff --git a/meta/recipes-support/libunwind/libunwind/0001-configure-Do-not-enforce-libdir-for-ppc64.patch b/meta/recipes-support/libunwind/libunwind/0001-configure-Do-not-enforce-libdir-for-ppc64.patch
deleted file mode 100644
index 751f1b3404..0000000000
--- a/meta/recipes-support/libunwind/libunwind/0001-configure-Do-not-enforce-libdir-for-ppc64.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 154c7465de2aeb9a8ba3416bbed6e6e07f58c583 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 11 Mar 2021 21:52:28 -0800
-Subject: [PATCH] configure: Do not enforce libdir for ppc64
-
-OE has its own multilib configuration, therefore hardcoding libdir
-breaks that, instead respect the settings coming from build environment
-via configure options.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index c8d68f7..254440f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -206,12 +206,6 @@ fi
- AM_CONDITIONAL(USE_DWARF, [test x$use_dwarf = xyes])
- AC_MSG_RESULT([$use_dwarf])
-
--if test x$target_arch = xppc64; then
-- libdir='${exec_prefix}/lib64'
-- AC_MSG_NOTICE([PowerPC64 detected, lib will be installed ${libdir}]);
-- AC_SUBST([libdir])
--fi
--
- AC_MSG_CHECKING([whether to restrict build to remote support])
- if test x$target_arch != x$host_arch; then
- CPPFLAGS="${CPPFLAGS} -DUNW_REMOTE_ONLY"
---
-2.30.2
-
diff --git a/meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch b/meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch
index 508ed6af38..f02f13f79c 100644
--- a/meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch
+++ b/meta/recipes-support/libunwind/libunwind/0003-x86-Stub-out-x86_local_resume.patch
@@ -1,7 +1,7 @@
-From f6866b9e4a6341c50eb1d923dbf48eca2ca40140 Mon Sep 17 00:00:00 2001
+From 0b2243f19d4ea12a2a68478a5aed503947a800af Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 22 Mar 2016 16:19:29 +0000
-Subject: [PATCH 3/6] x86: Stub out x86_local_resume()
+Subject: [PATCH] x86: Stub out x86_local_resume()
its purpose seems
to be unwinding across signal handler boundaries, which cannot happen
@@ -13,14 +13,14 @@ Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
- src/x86/Gos-linux.c | 22 +---------------------
- 1 file changed, 1 insertion(+), 21 deletions(-)
+ src/x86/Gos-linux.c | 26 +-------------------------
+ 1 file changed, 1 insertion(+), 25 deletions(-)
diff --git a/src/x86/Gos-linux.c b/src/x86/Gos-linux.c
-index fb9a5e3..c25ae0c 100644
+index d448dce..c25ae0c 100644
--- a/src/x86/Gos-linux.c
+++ b/src/x86/Gos-linux.c
-@@ -284,27 +284,7 @@ x86_r_uc_addr (ucontext_t *uc, int reg)
+@@ -284,31 +284,7 @@ x86_r_uc_addr (ucontext_t *uc, int reg)
HIDDEN int
x86_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
{
@@ -38,17 +38,18 @@ index fb9a5e3..c25ae0c 100644
- struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
-
- Debug (8, "resuming at ip=%x via sigreturn(%p)\n", c->dwarf.ip, sc);
+-#if !defined(__ANDROID__)
- x86_sigreturn (sc);
+-#endif
- }
- else
- {
- Debug (8, "resuming at ip=%x via setcontext()\n", c->dwarf.ip);
+-#if !defined(__ANDROID__)
- setcontext (uc);
+-#endif
- }
+ *(volatile char *)0=0;
return -UNW_EINVAL;
}
---
-2.20.1
-
diff --git a/meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch b/meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
index edaa822be1..e58a71b741 100644
--- a/meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
+++ b/meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
@@ -1,7 +1,8 @@
-From 02919d74b1599979884f9cee466ed392d9fc4819 Mon Sep 17 00:00:00 2001
+From 24c751f9d21e892a9833e1b70a696b07872b0f7f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 9 Jul 2016 01:07:53 +0000
-Subject: [PATCH 5/6] ppc32: Consider ucontext mismatches between glibc and
+Subject: [PATCH] ppc32: Consider ucontext mismatches between glibc and
+
musl
This helps in porting libunwind onto musl based systems
@@ -29,7 +30,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 92 insertions(+), 79 deletions(-)
diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c
-index ba30244..c5312d9 100644
+index 7b45455..f8d6886 100644
--- a/src/ppc32/Ginit.c
+++ b/src/ppc32/Ginit.c
@@ -48,12 +48,12 @@ uc_addr (ucontext_t *uc, int reg)
@@ -227,7 +228,7 @@ index c6ba806..b79f15c 100644
#endif
diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c
-index c82d1c9..6c31baa 100644
+index b7dd3b7..bfaf756 100644
--- a/src/ptrace/_UPT_reg_offset.c
+++ b/src/ptrace/_UPT_reg_offset.c
@@ -27,6 +27,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
@@ -242,8 +243,5 @@ index c82d1c9..6c31baa 100644
+# undef pt_regs
+#endif
- #ifdef HAVE_ASM_PTRACE_OFFSETS_H
- # include <asm/ptrace_offsets.h>
---
-2.20.1
-
+ #ifdef HAVE_ASM_PTRACE_H
+ # include <asm/ptrace.h>
diff --git a/meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch b/meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch
index 37ae8124cc..9941612387 100644
--- a/meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch
+++ b/meta/recipes-support/libunwind/libunwind/0006-Fix-for-X32.patch
@@ -1,7 +1,7 @@
-From 7a4fd5933cc795df85cdd85168fe54fbaec4dcec Mon Sep 17 00:00:00 2001
+From f2eae0af620925b3686410470fc6fbc66ec1dc52 Mon Sep 17 00:00:00 2001
From: Christopher Larson <chris_larson@mentor.com>
Date: Tue, 13 Dec 2016 09:50:34 -0700
-Subject: [PATCH 6/6] Fix for X32
+Subject: [PATCH] Fix for X32
Apply patch to fix the X32 build from https://github.com/sjnewbury/x32.
@@ -13,10 +13,10 @@ Signed-off-by: Christopher Larson <chris_larson@mentor.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/x86_64/Gos-linux.c b/src/x86_64/Gos-linux.c
-index bd14234..be1cb5b 100644
+index b489329..0550005 100644
--- a/src/x86_64/Gos-linux.c
+++ b/src/x86_64/Gos-linux.c
-@@ -145,8 +145,8 @@ x86_64_sigreturn (unw_cursor_t *cursor)
+@@ -146,8 +146,8 @@ x86_64_sigreturn (unw_cursor_t *cursor)
Debug (8, "resuming at ip=%llx via sigreturn(%p)\n",
(unsigned long long) c->dwarf.ip, sc);
@@ -25,8 +25,5 @@ index bd14234..be1cb5b 100644
+ __asm__ __volatile__ ("mov %q0, %%rsp;"
+ "mov %q1, %%rax;"
"syscall"
- :: "r"(sc), "i"(SYS_rt_sigreturn)
+ :: "r"((uint64_t)sc), "i"(SYS_rt_sigreturn)
: "memory");
---
-2.20.1
-
diff --git a/meta/recipes-support/libunwind/libunwind_1.5.0.bb b/meta/recipes-support/libunwind/libunwind_1.6.0.bb
index 9b515b58f4..81b364fc5e 100644
--- a/meta/recipes-support/libunwind/libunwind_1.5.0.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.6.0.bb
@@ -1,17 +1,14 @@
require libunwind.inc
SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
- file://0001-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
file://0003-x86-Stub-out-x86_local_resume.patch \
file://0004-Fix-build-on-mips-musl.patch \
file://0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
file://0006-Fix-for-X32.patch \
- file://0001-configure-Do-not-enforce-libdir-for-ppc64.patch \
"
SRC_URI:append:libc-musl = " file://musl-header-conflict.patch"
-SRC_URI[md5sum] = "c6923dda0675f6a4ef21426164dc8b6a"
-SRC_URI[sha256sum] = "90337653d92d4a13de590781371c604f9031cdb50520366aa1e3a91e1efb1017"
+SRC_URI[sha256sum] = "7194c20dda841b26917c0579e6467b53f7ad2e3f9452e5c77f3c3829c4656b70"
EXTRA_OECONF:append:libc-musl = " --disable-documentation --disable-tests --enable-static"