From 306161cf3b2e76abf1785e0910cdcee5dd24da36 Mon Sep 17 00:00:00 2001 From: shafeipaozi <2829702579@qq.com> Date: Thu, 11 Apr 2024 00:01:15 +0800 Subject: [PATCH] support riscv (cherry picked from commit de835ce23f88b1c520920f2486da61c1958c2174) --- libunwind.spec | 6 +++++- riscv.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 riscv.patch diff --git a/libunwind.spec b/libunwind.spec index 0ab5dff..bbc2463 100644 --- a/libunwind.spec +++ b/libunwind.spec @@ -1,7 +1,7 @@ Name: libunwind Epoch: 2 Version: 1.7.2 -Release: 2 +Release: 3 Summary: Libunwind provides a C ABI to determine the call-chain of a program License: BSD URL: http://savannah.nongnu.org/projects/libunwind @@ -11,6 +11,7 @@ Patch1: 0001-fix-byte_order_is_valid-function-logic.patch Patch2: backport-aarch64-unw_step-validates-address-before-calling-dwarf_get.patch Patch3: backport-avoid-calling-printf-because-OE-glibc-2.34-used-mno-.patch Patch4: backport-fix-run-ptrace-mapper-test-case-failed.patch +Patch9000: riscv.patch ExclusiveArch: aarch64 %{ix86} x86_64 riscv64 ppc64le loongarch64 @@ -88,6 +89,9 @@ make check || true %{_mandir}/*/* %changelog +* Thu Apr 11 2024 shafeipaozi - 2:1.7.2-3 +- add support riscv64 + * Mon Feb 26 2024 doupengda - 2:1.7.2-2 - Type:bugfix - ID:NA diff --git a/riscv.patch b/riscv.patch new file mode 100644 index 0000000..29f4188 --- /dev/null +++ b/riscv.patch @@ -0,0 +1,13 @@ +Index: libunwind-1.8.1/src/riscv/Gis_signal_frame.c +=================================================================== +--- libunwind-1.8.1.orig/src/riscv/Gis_signal_frame.c ++++ libunwind-1.8.1/src/riscv/Gis_signal_frame.c +@@ -57,7 +57,7 @@ unw_is_signal_frame (unw_cursor_t *curso + + ip = c->dwarf.ip; + +- if (!ip || !a->access_mem || (ip & (sizeof(unw_word_t) - 1))) ++ if (!ip || !a->access_mem) + return 0; + + if ((ret = (*a->access_mem) (as, ip, &i0, 0, arg)) < 0) -- Gitee