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

(-)a/alt-loongarch64.patch (+47 lines)
Line 0 Link Here
1
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp
2
index a0ce5baa..5bbc75e4 100644
3
--- a/src/corelib/global/archdetect.cpp
4
+++ b/src/corelib/global/archdetect.cpp
5
@@ -23,6 +23,8 @@
6
 #  define ARCH_PROCESSOR "x86_64"
7
 #elif defined(Q_PROCESSOR_IA64)
8
 #  define ARCH_PROCESSOR "ia64"
9
+#elif defined(Q_PROCESSOR_LOONGARCH_64)
10
+#  define ARCH_PROCESSOR "loongarch64"
11
 #elif defined(Q_PROCESSOR_MIPS_64)
12
 #  define ARCH_PROCESSOR "mips64"
13
 #elif defined(Q_PROCESSOR_MIPS)
14
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
15
index f18cbf32..d1d9f59c 100644
16
--- a/src/corelib/global/qprocessordetection.h
17
+++ b/src/corelib/global/qprocessordetection.h
18
@@ -187,6 +187,16 @@
19
 #  define Q_PROCESSOR_WORDSIZE   8
20
 // Q_BYTE_ORDER not defined, use endianness auto-detection
21
 
22
+/*
23
+    LoongArch family, supported variant: lp64d ABI
24
+
25
+    LoongArch is little-endian
26
+*/
27
+#elif defined(__loongarch64)
28
+   #define Q_PROCESSOR_LOONGARCH
29
+   #define Q_PROCESSOR_LOONGARCH_64
30
+   #define Q_PROCESSOR_WORDSIZE 8
31
+   #define Q_BYTE_ORDER Q_LITTLE_ENDIAN
32
 /*
33
     MIPS family, known revisions: I, II, III, IV, 32, 64
34
 
35
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
36
index 6ebfaff2..06c77efc 100644
37
--- a/src/corelib/plugin/qelfparser_p.cpp
38
+++ b/src/corelib/plugin/qelfparser_p.cpp
39
@@ -120,6 +120,8 @@ struct ElfMachineCheck
40
             EM_BLACKFIN
41
 #elif defined(Q_PROCESSOR_IA64)
42
             EM_IA_64
43
+#elif defined(Q_PROCESSOR_LOONGARCH)
44
+            EM_LOONGARCH
45
 #elif defined(Q_PROCESSOR_MIPS)
46
             EM_MIPS
47
 #elif defined(Q_PROCESSOR_POWER_32)
(-)a/qtbase.spec (-1 / +2 lines)
Lines 56-61 Patch1002: alt-ca-certificates-path.patch Link Here
56
Patch1003: alt-decrease-iconloader-fallback-depth.patch
56
Patch1003: alt-decrease-iconloader-fallback-depth.patch
57
Patch1004: alt-kernel-requires.patch
57
Patch1004: alt-kernel-requires.patch
58
Patch1005: e2k-qt-6.patch
58
Patch1005: e2k-qt-6.patch
59
Patch3500: alt-loongarch64.patch
59
60
60
# macros
61
# macros
61
%define _qt6 %gname
62
%define _qt6 %gname
Lines 370-375 OpenGL widgets library for the Qt%major toolkit Link Here
370
%ifarch %e2k
371
%ifarch %e2k
371
%patch1005 -p1
372
%patch1005 -p1
372
%endif
373
%endif
374
%patch3500 -p1
373
375
374
# install optflags
376
# install optflags
375
%add_optflags %optflags_shared
377
%add_optflags %optflags_shared
376
- 

Return to bug 46477