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

(-)a/.gear/qtwebkit-loongarch64.patch (+113 lines)
Line 0 Link Here
1
diff --git a/CMakeLists.txt b/CMakeLists.txt
2
index 7e6c6e989..6c4fed042 100644
3
--- a/CMakeLists.txt
4
+++ b/CMakeLists.txt
5
@@ -90,6 +90,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
6
     set(WTF_CPU_S390X 1)
7
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
8
     set(WTF_CPU_RISCV64 1)
9
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
10
+    set(WTF_CPU_LOONGARCH64 1)
11
 else ()
12
     message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
13
 endif ()
14
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
15
index 83b0f399c..a439444ef 100644
16
--- a/Source/JavaScriptCore/CMakeLists.txt
17
+++ b/Source/JavaScriptCore/CMakeLists.txt
18
@@ -1280,6 +1280,7 @@ if (WTF_CPU_ARM)
19
 elseif (WTF_CPU_ARM64)
20
 elseif (WTF_CPU_ALPHA)
21
 elseif (WTF_CPU_HPPA)
22
+elseif (WTF_CPU_LOONGARCH64)
23
 elseif (WTF_CPU_PPC)
24
 elseif (WTF_CPU_PPC64)
25
 elseif (WTF_CPU_PPC64LE)
26
diff --git a/Source/ThirdParty/ANGLE/src/common/mathutil.h b/Source/ThirdParty/ANGLE/src/common/mathutil.h
27
index 7959da8bd..c86afd61e 100644
28
--- a/Source/ThirdParty/ANGLE/src/common/mathutil.h
29
+++ b/Source/ThirdParty/ANGLE/src/common/mathutil.h
30
@@ -16,6 +16,7 @@
31
 #include <algorithm>
32
 #include <string.h>
33
 #include <stdlib.h>
34
+#include <cstdint>
35
 
36
 namespace gl
37
 {
38
diff --git a/Source/ThirdParty/brotli/dec/port.h b/Source/ThirdParty/brotli/dec/port.h
39
index 54f51b010..e6da12d35 100644
40
--- a/Source/ThirdParty/brotli/dec/port.h
41
+++ b/Source/ThirdParty/brotli/dec/port.h
42
@@ -60,6 +60,10 @@
43
 #define BROTLI_TARGET_RISCV64
44
 #endif
45
 
46
+#if defined(__loongarch64)
47
+#define BROTLI_TARGET_LOONGARCH64
48
+#endif
49
+
50
 #ifdef BROTLI_BUILD_PORTABLE
51
 #define BROTLI_ALIGNED_READ (!!1)
52
 #elif defined(BROTLI_TARGET_X86) || defined(BROTLI_TARGET_X64) || \
53
@@ -100,6 +104,7 @@ static BROTLI_INLINE void BrotliDump(const char* f, int l, const char* fn) {
54
 #elif defined(BROTLI_BUILD_32_BIT)
55
 #define BROTLI_64_BITS 0
56
 #elif defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8) || \
57
+    defined(BROTLI_TARGET_LOONGARCH64) || \
58
     defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64)
59
 #define BROTLI_64_BITS 1
60
 #else
61
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
62
index 7aefa1bab..224bd5ac7 100644
63
--- a/Source/WTF/wtf/Platform.h
64
+++ b/Source/WTF/wtf/Platform.h
65
@@ -176,6 +176,11 @@
66
 #define WTF_CPU_X86_SSE2 1
67
 #endif
68
 
69
+/* CPU(LOONGARCH64) - LoongArch */
70
+#if defined(__loongarch64)
71
+#define WTF_CPU_LOONGARCH64 1
72
+#endif
73
+
74
 /* CPU(RISCV64) - RISCV64 */
75
 #if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
76
 #define WTF_CPU_RISCV64 1
77
@@ -710,6 +715,7 @@
78
     || CPU(ALPHA) \
79
     || CPU(ARM64) \
80
     || CPU(S390X) \
81
+    || CPU(LOONGARCH64) \
82
     || CPU(MIPS64) \
83
     || CPU(PPC64) \
84
     || CPU(PPC64LE) \
85
diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h
86
index 176d5909f..b13616295 100644
87
--- a/Source/WTF/wtf/dtoa/utils.h
88
+++ b/Source/WTF/wtf/dtoa/utils.h
89
@@ -49,7 +49,7 @@
90
 defined(__ARMEL__) || \
91
 defined(_MIPS_ARCH_MIPS32R2)
92
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
93
-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) || CPU(RISCV64)
94
+#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) || CPU(LOONGARCH64) || CPU(RISCV64)
95
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
96
 #elif defined(_M_IX86) || defined(__i386__)
97
 #if defined(_WIN32)
98
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
99
index 4a075d41c..5932fed69 100755
100
--- a/Tools/Scripts/webkitdirs.pm
101
+++ b/Tools/Scripts/webkitdirs.pm
102
@@ -1264,6 +1264,11 @@ sub isARM()
103
     return ($Config{archname} =~ /^arm[v\-]/) || ($Config{archname} =~ /^aarch64[v\-]/);
104
 }
105
 
106
+sub isLOONGARCH()
107
+{
108
+    return ($Config{archname} =~ /^loongarch64\-/);
109
+}
110
+
111
 sub isRISCV()
112
 {
113
     return ($Config{archname} =~ /^riscv(|32|64)\-/);
(-)a/.gear/qtwebkit.spec (-2 / +9 lines)
Lines 8-14 Link Here
8
8
9
Name: qt5-webkit
9
Name: qt5-webkit
10
Version: 5.212.0
10
Version: 5.212.0
11
Release: alt24
11
Release: alt25
12
12
13
Group: System/Libraries
13
Group: System/Libraries
14
Summary: Qt5 - QtWebKit components
14
Summary: Qt5 - QtWebKit components
Lines 25-30 Patch7: qtwebkit-5.212.0_pre20200309-icu-68.patch Link Here
25
Patch10: alt-flags.patch
25
Patch10: alt-flags.patch
26
# Elbrus
26
# Elbrus
27
Patch2000: qtwebkit-e2k.patch
27
Patch2000: qtwebkit-e2k.patch
28
# LoongArch
29
Patch3500: qtwebkit-loongarch64.patch
28
30
29
# Automatically added by buildreq on Mon Sep 30 2013 (-bi)
31
# Automatically added by buildreq on Mon Sep 30 2013 (-bi)
30
# optimized out: elfutils fontconfig glib2-devel glibc-devel-static gstreamer-devel libGL-devel libX11-devel libXfixes-devel libfreetype-devel libgst-plugins libqt5-core libqt5-gui libqt5-network libqt5-opengl libqt5-printsupport libqt5-qml libqt5-quick libqt5-sql libqt5-v8 libqt5-widgets libstdc++-devel libxml2-devel pkg-config python-base python-modules python-modules-compiler python-modules-encodings python-modules-xml python3 python3-base qt5-base-devel qt5-declarative-devel ruby ruby-stdlibs xorg-compositeproto-devel xorg-fixesproto-devel xorg-renderproto-devel xorg-xproto-devel zlib-devel
32
# optimized out: elfutils fontconfig glib2-devel glibc-devel-static gstreamer-devel libGL-devel libX11-devel libXfixes-devel libfreetype-devel libgst-plugins libqt5-core libqt5-gui libqt5-network libqt5-opengl libqt5-printsupport libqt5-qml libqt5-quick libqt5-sql libqt5-v8 libqt5-widgets libstdc++-devel libxml2-devel pkg-config python-base python-modules python-modules-compiler python-modules-encodings python-modules-xml python3 python3-base qt5-base-devel qt5-declarative-devel ruby ruby-stdlibs xorg-compositeproto-devel xorg-fixesproto-devel xorg-renderproto-devel xorg-xproto-devel zlib-devel
Lines 107-112 Requires: libqt5-core = %_qt5_version Link Here
107
%ifarch %e2k
109
%ifarch %e2k
108
%patch2000 -p1
110
%patch2000 -p1
109
%endif
111
%endif
112
%ifnarch %e2k
113
%patch3500 -p1
114
%endif
110
syncqt.pl-qt5 Source -version %version
115
syncqt.pl-qt5 Source -version %version
111
116
112
# remove rpath
117
# remove rpath
Lines 222-227 done Link Here
222
%_pkgconfigdir/Qt*.pc
227
%_pkgconfigdir/Qt*.pc
223
228
224
%changelog
229
%changelog
230
* Sun Jun 18 2023 Alexey Sheplyakov <asheplyakov@altlinux.org> 5.212.0-alt25
231
- support LoongArch architecture (lp64d ABI) (closes: #46582)
232
225
* Fri Oct 01 2021 Sergey V Turchin <zerg@altlinux.org> 5.212.0-alt24
233
* Fri Oct 01 2021 Sergey V Turchin <zerg@altlinux.org> 5.212.0-alt24
226
- build without LTO enabled
234
- build without LTO enabled
227
235
228
- 

Return to bug 46582