From: Weijie Gao Date: Thu, 14 Mar 2024 16:44:06 +0000 (+0800) Subject: libunwind: add support for loongarch64 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3f28c422ba7ca06efd41686fd2f9e664f7e8a12e;p=openwrt%2Fstaging%2Fxback.git libunwind: add support for loongarch64 Modify package depends to allow building for loongarch64. Also fix for building with musl. Signed-off-by: Weijie Gao --- 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)