From 3f28c422ba7ca06efd41686fd2f9e664f7e8a12e Mon Sep 17 00:00:00 2001 From: Weijie Gao Date: Fri, 15 Mar 2024 00:44:06 +0800 Subject: [PATCH] libunwind: add support for loongarch64 Modify package depends to allow building for loongarch64. Also fix for building with musl. Signed-off-by: Weijie Gao --- package/libs/libunwind/Makefile | 2 +- .../libunwind/patches/005-loongarch64-musl.pattch | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 package/libs/libunwind/patches/005-loongarch64-musl.pattch diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile index 7a82d76663..7bd3c5ac17 100644 --- a/package/libs/libunwind/Makefile +++ b/package/libs/libunwind/Makefile @@ -32,7 +32,7 @@ define Package/libunwind CATEGORY:=Libraries TITLE:=The libunwind project URL:=http://www.nongnu.org/libunwind/ - DEPENDS:=@((mips||mipsel||mips64||powerpc64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib + DEPENDS:=@((mips||mipsel||mips64||powerpc64||x86_64||arm||aarch64||loongarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib ABI_VERSION:=8 endef diff --git a/package/libs/libunwind/patches/005-loongarch64-musl.pattch b/package/libs/libunwind/patches/005-loongarch64-musl.pattch new file mode 100644 index 0000000000..bb961bdfad --- /dev/null +++ b/package/libs/libunwind/patches/005-loongarch64-musl.pattch @@ -0,0 +1,12 @@ +--- a/src/loongarch64/getcontext.S ++++ b/src/loongarch64/getcontext.S +@@ -25,7 +25,9 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + + #include "offsets.h" ++#ifdef __GLIBC__ + #include ++#endif + .text + + #define SREG(X) st.d $r##X, $r4, (LINUX_UC_MCONTEXT_GREGS + 8 * X) -- 2.30.2