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