Source: qtwebkit-opensource-src
Version: 5.212.0~alpha4-33
Severity: wishlist
Tags: ftbfs
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

Compiling the qtwebkit-opensource-src failed for loong64 in the Debian Package Auto-Building environment.
The reason is the lack of loongarch64 support in qtwebkit-opensource-src.

I have added the patch(add loongarch64 support) to upstream, please see the pull-request https://github.com/qtwebkit/qtwebkit/pull/1096.
But the status of pull request from upstream is still open.

Reference to other architectures, I added the loongarch64 support to the qtwebkit-opensource-src source package.
Please consider the patch I attached.
If you have any questions, you can contact me at any time.

thanks,
Dandan Zhang

Description: Add loongarch64 support
Author: Dandan Zhang <zhangdan...@loongson.cn>
Forwarded: https://github.com/qtwebkit/qtwebkit/pull/1096
Last-Update: 2024-03-05

--- qtwebkit-opensource-src-5.212.0~alpha4.orig/CMakeLists.txt
+++ qtwebkit-opensource-src-5.212.0~alpha4/CMakeLists.txt
@@ -63,6 +63,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR
     set(WTF_CPU_ARM64 1)
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "alpha*")
     set(WTF_CPU_ALPHA 1)
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
+    set(WTF_CPU_LOONGARCH64 1)
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
     set(WTF_CPU_MIPS 1)
 elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sh4")
--- qtwebkit-opensource-src-5.212.0~alpha4.orig/Source/JavaScriptCore/CMakeLists.txt
+++ qtwebkit-opensource-src-5.212.0~alpha4/Source/JavaScriptCore/CMakeLists.txt
@@ -1280,6 +1280,7 @@ if (WTF_CPU_ARM)
 elseif (WTF_CPU_ARM64)
 elseif (WTF_CPU_ALPHA)
 elseif (WTF_CPU_HPPA)
+elseif (WTF_CPU_LOONGARCH64)
 elseif (WTF_CPU_PPC)
 elseif (WTF_CPU_PPC64)
 elseif (WTF_CPU_PPC64LE)
--- qtwebkit-opensource-src-5.212.0~alpha4.orig/Source/WTF/wtf/Platform.h
+++ qtwebkit-opensource-src-5.212.0~alpha4/Source/WTF/wtf/Platform.h
@@ -80,6 +80,11 @@
 #endif
 #endif
 
+/* CPU(LOONGARCH64) - LoongArch 64-bit */
+#if defined(__loongarch64)
+#define WTF_CPU_LOONGARCH64 1
+#endif
+
 /* CPU(MIPS) - MIPS 32-bit and 64-bit */
 #if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) || defined(__mips64))
 #if defined(_ABI64) && (_MIPS_SIM == _ABI64)
@@ -713,7 +718,8 @@
     || CPU(MIPS64) \
     || CPU(PPC64) \
     || CPU(PPC64LE) \
-    || CPU(RISCV64)
+    || CPU(RISCV64) \
+    || CPU(LOONGARCH64)
 #define USE_JSVALUE64 1
 #else
 #define USE_JSVALUE32_64 1
--- qtwebkit-opensource-src-5.212.0~alpha4.orig/Source/WTF/wtf/dtoa/utils.h
+++ qtwebkit-opensource-src-5.212.0~alpha4/Source/WTF/wtf/dtoa/utils.h
@@ -49,7 +49,7 @@
 defined(__ARMEL__) || \
 defined(_MIPS_ARCH_MIPS32R2)
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
-#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)
+#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) || CPU(LOONGARCH64)
 #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
 #elif defined(_M_IX86) || defined(__i386__)
 #if defined(_WIN32)

Reply via email to