summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeijie Gao2024-03-14 16:44:06 +0000
committerChuanhong Guo2024-05-04 06:14:24 +0000
commit3f28c422ba7ca06efd41686fd2f9e664f7e8a12e (patch)
treebc83554b39489d8fa2f01d0b265049436171a2db
parent33cd87079b926d95a7bd85fdcd7614e869bd2851 (diff)
downloadopenwrt-3f28c422ba7ca06efd41686fd2f9e664f7e8a12e.tar.gz
libunwind: add support for loongarch64
Modify package depends to allow building for loongarch64. Also fix for building with musl. Signed-off-by: Weijie Gao <hackpascal@gmail.com>
-rw-r--r--package/libs/libunwind/Makefile2
-rw-r--r--package/libs/libunwind/patches/005-loongarch64-musl.pattch12
2 files changed, 13 insertions, 1 deletions
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 <endian.h>
++#endif
+ .text
+
+ #define SREG(X) st.d $r##X, $r4, (LINUX_UC_MCONTEXT_GREGS + 8 * X)