[openwrt/openwrt] libunwind: add support for loongarch64
LEDE Commits
lede-commits at lists.infradead.org
Fri May 3 23:41:03 PDT 2024
981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3f28c422ba7ca06efd41686fd2f9e664f7e8a12e
commit 3f28c422ba7ca06efd41686fd2f9e664f7e8a12e
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Fri Mar 15 00:44:06 2024 +0800
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 at gmail.com>
---
package/libs/libunwind/Makefile | 2 +-
package/libs/libunwind/patches/005-loongarch64-musl.pattch | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
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)
More information about the lede-commits
mailing list