View | Details | Raw Unified | Return to bug 46358
Collapse All | Expand All

(-)a/alt-loongarch64-support.patch (+47 lines)
Line 0 Link Here
1
diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h
2
index 70e697ca00..9be294a2d0 100644
3
--- a/src/3rdparty/double-conversion/include/double-conversion/utils.h
4
+++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h
5
@@ -102,6 +102,7 @@ int main(int argc, char** argv) {
6
     defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
7
     defined(__riscv) || \
8
     defined(__or1k__) || defined(__arc__) || \
9
+    defined(__loongarch64) || \
10
     defined(__EMSCRIPTEN__)
11
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
12
 #elif defined(__mc68000__) || \
13
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp
14
index 1d00b7f5a5..74f3c8fc86 100644
15
--- a/src/corelib/global/archdetect.cpp
16
+++ b/src/corelib/global/archdetect.cpp
17
@@ -59,6 +59,8 @@
18
 #  define ARCH_PROCESSOR "x86_64"
19
 #elif defined(Q_PROCESSOR_IA64)
20
 #  define ARCH_PROCESSOR "ia64"
21
+#elif defined(Q_PROCESSOR_LOONGARCH_64)
22
+#  define ARCH_PROCESSOR "loongarch64"
23
 #elif defined(Q_PROCESSOR_MIPS_64)
24
 #  define ARCH_PROCESSOR "mips64"
25
 #elif defined(Q_PROCESSOR_MIPS)
26
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
27
index 8d65720850..3a4271e82f 100644
28
--- a/src/corelib/global/qprocessordetection.h
29
+++ b/src/corelib/global/qprocessordetection.h
30
@@ -223,6 +223,17 @@
31
 #  define Q_PROCESSOR_WORDSIZE   8
32
 // Q_BYTE_ORDER not defined, use endianness auto-detection
33
 
34
+/*
35
+    LoongArch family, supported variant: lp64d ABI
36
+
37
+    LoongArch is little-endian.
38
+*/
39
+
40
+#elif defined(__loongarch64)
41
+   #define Q_PROCESSOR_LOONGARCH
42
+   #define Q_PROCESSOR_LOONGARCH_64
43
+   #define Q_BYTE_ORDER Q_LITTLE_ENDIAN
44
+
45
 /*
46
     MIPS family, known revisions: I, II, III, IV, 32, 64
47
 
(-)a/qtbase.spec (-1 / +2 lines)
Lines 81-86 Patch1010: alt-zonetab.patch Link Here
81
Patch1011: alt-kernel-requires.patch
81
Patch1011: alt-kernel-requires.patch
82
Patch1012: alt-fix-paths.patch
82
Patch1012: alt-fix-paths.patch
83
Patch1013: alt-QTBUG-88599.patch
83
Patch1013: alt-QTBUG-88599.patch
84
Patch1014: alt-loongarch64-support.patch
84
85
85
# macros
86
# macros
86
%define _qt5 %gname
87
%define _qt5 %gname
Lines 421-426 done Link Here
421
%patch1011 -p1
422
%patch1011 -p1
422
%patch1012 -p1
423
%patch1012 -p1
423
%patch1013 -p1
424
%patch1013 -p1
425
%patch1014 -p1
424
bin/syncqt.pl -version %version
426
bin/syncqt.pl -version %version
425
427
426
# install optflags
428
# install optflags
427
- 

Return to bug 46358