summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python3-sipsimple/pjsip-0003-LoongArch64.patch
blob: 8d8c2ca50f4365ced8190bde3695ace206e2c107 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From 837d5d183588bfd42fc581a415714972f758b83d Mon Sep 17 00:00:00 2001
From: xiaoxiaoafeifei <zhailiangliang@loongson.cn>
Date: Tue, 12 Aug 2025 16:11:35 +0200
Subject: [PATCH 3/3] Add support for the LoongArch64 architecture (#4386)

---
 aconfigure                               | 3 +++
 aconfigure.ac                            | 3 +++
 third_party/webrtc/src/webrtc/typedefs.h | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/aconfigure b/aconfigure
index 09cd7b901..d551e6338 100755
--- a/aconfigure
+++ b/aconfigure
@@ -9114,6 +9114,9 @@ $as_echo "Checking if libwebrtc is disabled...no" >&6; }
                                  ac_webrtc_instset=neon
                                  ac_webrtc_cflags="-DWEBRTC_ARCH_ARM64"
                                  ;;
+                             loongarch*)
+                                 ac_webrtc_instset=generic
+                                 ;;
                              riscv*)
                                  ac_webrtc_instset=generic
                                  ;;
diff --git a/aconfigure.ac b/aconfigure.ac
index 81be8ed7b..cb4552ab5 100644
--- a/aconfigure.ac
+++ b/aconfigure.ac
@@ -2154,6 +2154,9 @@ AC_ARG_ENABLE(libwebrtc,
                                      ac_webrtc_instset=generic
                                  fi
                                  ;;
+                             loongarch*)
+                                 ac_webrtc_instset=generic
+                                 ;;
                              riscv*)
                                  ac_webrtc_instset=generic
                                  ;;
diff --git a/third_party/webrtc/src/webrtc/typedefs.h b/third_party/webrtc/src/webrtc/typedefs.h
index d8d9813fe..2493f77cd 100644
--- a/third_party/webrtc/src/webrtc/typedefs.h
+++ b/third_party/webrtc/src/webrtc/typedefs.h
@@ -54,6 +54,9 @@
 #else
 #define WEBRTC_ARCH_32_BITS
 #endif
+#elif defined(__loongarch64) || defined(__loongarch64__)
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#define WEBRTC_ARCH_64_BITS
 #else
 #error Please add support for your architecture in typedefs.h
 #endif
-- 
2.50.1