Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
8081faeb2e
!29 add riscv support
From: @Jingwiw 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2023-09-24 09:42:08 +00:00
Jingwiw
b7db11927f add riscv64 support 2023-09-22 11:07:01 +08:00
openeuler-ci-bot
d83af46b1e
!25 fix build error
From: @peijiankang 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2023-08-02 09:36:08 +00:00
peijiankang
5db41550a7 fix build error 2023-08-02 14:41:35 +08:00
openeuler-ci-bot
c5f08d50ad
!23 add loongarch support for qt5-qtwebkit
From: @zhangwenlong01 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2023-03-14 03:47:54 +00:00
Wenlong Zhang
e940be0015 add loongarch support for qt5-qtwebkit
Signed-off-by: Wenlong Zhang <zhangwenlong@loongson.cn>
2022-12-13 09:42:05 +08:00
openeuler-ci-bot
0d6f570f06
!20 License compliance rectification
From: @chen-jan 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2022-05-11 02:02:05 +00:00
chen-jan
247ca392ba License compliance rectification 2022-05-10 12:06:28 +00:00
openeuler-ci-bot
4a5c0d4c59
!19 [sync] PR-18: 【编译失败处理】22.03:LTS:Next分支包编译失败
From: @openeuler-sync-bot 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2022-03-18 03:47:57 +00:00
wang--ge
f4ceb31274 fix build error due to json load does not surport encoding parameter
(cherry picked from commit 4320feb81ed9163442f014574922f256cc0a4e6c)
2022-03-07 17:44:34 +08:00
6 changed files with 353 additions and 4 deletions

View File

@ -0,0 +1,79 @@
From f391fa67112da31da7b6ce0011cecadbee29bedb Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Tue, 13 Dec 2022 01:30:55 +0000
Subject: [PATCH] add loongarch support for qtwebkit
---
CMakeLists.txt | 2 ++
Source/JavaScriptCore/CMakeLists.txt | 1 +
Source/WTF/wtf/Platform.h | 7 ++++++-
Source/WTF/wtf/dtoa/utils.h | 2 +-
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db54eb4..0acb7ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,6 +88,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390")
set(WTF_CPU_S390 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
set(WTF_CPU_S390X 1)
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
+ set(WTF_CPU_LOONGARCH64 1)
else ()
message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
endif ()
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index afd76ca..4d6a72b 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -1288,6 +1288,7 @@ elseif (WTF_CPU_S390X)
elseif (WTF_CPU_MIPS)
elseif (WTF_CPU_SH4)
elseif (WTF_CPU_X86)
+elseif (WTF_CPU_LOONGARCH64)
elseif (WTF_CPU_X86_64)
if (MSVC AND ENABLE_JIT)
add_custom_command(
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 5717f3e..76f4262 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -166,7 +166,11 @@
#if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
#define WTF_CPU_X86_SSE2 1
#endif
+#endif
+/* CPU(LOONGARCH64) - LOONGARCH64 */
+#if defined(__loongarch64)
+#define WTF_CPU_LOONGARCH64 1
#endif
/* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
@@ -707,7 +711,8 @@
|| CPU(S390X) \
|| CPU(MIPS64) \
|| CPU(PPC64) \
- || CPU(PPC64LE)
+ || CPU(PPC64LE) \
+ || CPU(LOONGARCH64)
#define USE_JSVALUE64 1
#else
#define USE_JSVALUE32_64 1
diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h
index 889642c..a90287d 100644
--- a/Source/WTF/wtf/dtoa/utils.h
+++ b/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)
+#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)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__)
#if defined(_WIN32)
--
2.33.0

View File

@ -0,0 +1,117 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0acb7ba..77687d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,6 +90,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
set(WTF_CPU_S390X 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
set(WTF_CPU_LOONGARCH64 1)
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
+ set(WTF_CPU_RISCV64 1)
else ()
message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
endif ()
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index 4d6a72b..ed35b54 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -1289,6 +1289,7 @@ elseif (WTF_CPU_MIPS)
elseif (WTF_CPU_SH4)
elseif (WTF_CPU_X86)
elseif (WTF_CPU_LOONGARCH64)
+elseif (WTF_CPU_RISCV64)
elseif (WTF_CPU_X86_64)
if (MSVC AND ENABLE_JIT)
add_custom_command(
diff --git a/Source/ThirdParty/brotli/dec/port.h b/Source/ThirdParty/brotli/dec/port.h
index 6b3d735..d1c8c14 100644
--- a/Source/ThirdParty/brotli/dec/port.h
+++ b/Source/ThirdParty/brotli/dec/port.h
@@ -56,10 +56,15 @@
#define BROTLI_TARGET_POWERPC64
#endif
+#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+#define BROTLI_TARGET_RISCV64
+#endif
+
#ifdef BROTLI_BUILD_PORTABLE
#define BROTLI_ALIGNED_READ (!!1)
#elif defined(BROTLI_TARGET_X86) || defined(BROTLI_TARGET_X64) || \
- defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8)
+ defined(BROTLI_TARGET_ARMV7) || defined(BROTLI_TARGET_ARMV8) || \
+ defined(BROTLI_TARGET_RISCV64)
/* Allow unaligned read only for white-listed CPUs. */
#define BROTLI_ALIGNED_READ (!!0)
#else
@@ -96,7 +101,7 @@ static BROTLI_INLINE void BrotliDump(const char* f, int l, const char* fn) {
#elif defined(BROTLI_BUILD_32_BIT)
#define BROTLI_64_BITS 0
#elif defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8) || \
- defined(BROTLI_TARGET_POWERPC64)
+ defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64)
#define BROTLI_64_BITS 1
#else
#define BROTLI_64_BITS 0
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
index 76f4262..338fddc 100644
--- a/Source/WTF/wtf/Platform.h
+++ b/Source/WTF/wtf/Platform.h
@@ -180,6 +180,11 @@
#define WTF_CPU_X86_SSE2 1
#endif
+/* CPU(RISCV64) - RISCV64 */
+#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
+#define WTF_CPU_RISCV64 1
+#endif
+
/* CPU(ARM64) - Apple */
#if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)
#define WTF_CPU_ARM64 1
@@ -712,6 +717,7 @@
|| CPU(MIPS64) \
|| CPU(PPC64) \
|| CPU(PPC64LE) \
+ || CPU(RISCV64) \
|| CPU(LOONGARCH64)
#define USE_JSVALUE64 1
#else
diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h
index a90287d..b136162 100644
--- a/Source/WTF/wtf/dtoa/utils.h
+++ b/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(LOONGARCH64)
+#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)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__)
#if defined(_WIN32)
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index 45b6649..6e6acd1 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -1264,6 +1264,11 @@ sub isARM()
return ($Config{archname} =~ /^arm[v\-]/) || ($Config{archname} =~ /^aarch64[v\-]/);
}
+sub isRISCV()
+{
+ return ($Config{archname} =~ /^riscv(|32|64)\-/);
+}
+
sub isX86_64()
{
return (architecture() eq "x86_64") || 0;
@@ -2069,7 +2074,7 @@ sub generateBuildSystemFromCMakeProject
# Compiler options to keep floating point values consistent
# between 32-bit and 64-bit architectures.
determineArchitecture();
- if ($architecture ne "x86_64" && !isARM() && !isCrossCompilation() && !isAnyWindows()) {
+ if ($architecture ne "x86_64" && !isARM() && !isRISCV() && !isCrossCompilation() && !isAnyWindows()) {
$ENV{'CXXFLAGS'} = "-march=pentium4 -msse2 -mfpmath=sse " . ($ENV{'CXXFLAGS'} || "");
}

View File

@ -0,0 +1,71 @@
From d5d8791a6159f6ac5b09b1b782b7a1f9520ab52c Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Thu, 13 Jan 2022 18:02:19 +0800
Subject: [PATCH] fix TRUE and FALSE was not declared
---
Source/WebCore/platform/text/TextCodecICU.cpp | 3 +++
Source/WebCore/platform/text/icu/UTextProvider.h | 3 +++
Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp | 3 +++
Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp | 3 +++
4 files changed, 12 insertions(+)
diff --git a/Source/WebCore/platform/text/TextCodecICU.cpp b/Source/WebCore/platform/text/TextCodecICU.cpp
index dd6ff06..ef258c9 100644
--- a/Source/WebCore/platform/text/TextCodecICU.cpp
+++ b/Source/WebCore/platform/text/TextCodecICU.cpp
@@ -39,6 +39,9 @@
#include <wtf/text/StringBuilder.h>
#include <wtf/unicode/CharacterNames.h>
+#define FALSE (1 != 1)
+#define TRUE (1 == 1)
+
namespace WebCore {
const size_t ConversionBufferSize = 16384;
diff --git a/Source/WebCore/platform/text/icu/UTextProvider.h b/Source/WebCore/platform/text/icu/UTextProvider.h
index c254fc4..6bd3bf2 100644
--- a/Source/WebCore/platform/text/icu/UTextProvider.h
+++ b/Source/WebCore/platform/text/icu/UTextProvider.h
@@ -28,6 +28,9 @@
#include <unicode/utext.h>
+#define FALSE (1 != 1)
+#define TRUE (1 == 1)
+
namespace WebCore {
enum class UTextProviderContext {
diff --git a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
index cd6852c..c4ce2de 100644
--- a/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
+++ b/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
@@ -29,6 +29,9 @@
#include "UTextProvider.h"
#include <wtf/text/StringImpl.h>
+#define FALSE (1 != 1)
+#define TRUE (1 == 1)
+
namespace WebCore {
// Latin1 provider
diff --git a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
index 7aaac48..ab41175 100644
--- a/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
+++ b/Source/WebCore/platform/text/icu/UTextProviderUTF16.cpp
@@ -28,6 +28,9 @@
#include "UTextProvider.h"
+#define FALSE (1 != 1)
+#define TRUE (1 == 1)
+
namespace WebCore {
// UTF16ContextAware provider
--
2.30.0

View File

@ -16,10 +16,10 @@
Name: qt5-%{qt_module}
Version: 5.212.0
Release: 5
Release: 10
Summary: Qt5 - QtWebKit components
License: LGPLv2 and BSD
License: LGPL-2.0-or-later and BSD-2-Clause
URL: https://github.com/qtwebkit/qtwebkit
Source0: https://github.com/qtwebkit/qtwebkit/releases/download/%{qt_module}-%{version}%{?prerel_tag}/%{qt_module}-%{version}%{?prerel_tag}.tar.xz
@ -27,6 +27,15 @@ Source0: https://github.com/qtwebkit/qtwebkit/releases/download/%{qt_modu
Patch2: qtwebkit-5.212.0_cmake_cmp0071.patch
Patch3: fix_build_with_bison.patch
Patch4: fix_build_with_glib2_68.patch
Patch5: 0001-fix-TRUE-and-FALSE-was-not-declared.patch
Patch6: 0001-add-loongarch-support-for-qtwebkit.patch
# From https://github.com/WebKit/WebKit/commit/c7d19a492d97f9282a546831beb918e03315f6ef
# Ruby 3.2 removes Object#=~ completely
Patch7: webkit-offlineasm-warnings-ruby27.patch
Patch8: qtwebkit-cstdint.patch
Patch9: 0001-add-riscv64-support.patch
BuildRequires: bison
BuildRequires: cmake
@ -109,6 +118,7 @@ BuildArch: noarch
%prep
%autosetup -p1 -n %{qt_module}-%{version}%{?prerel_tag}
sed -i 's/json.load(bytecodeFile, encoding = "utf-8")/json.load(bytecodeFile)/g' ./Source/JavaScriptCore/generate-bytecode-files
# find/fix pngs with "libpng warning: iCCP: known incorrect sRGB profile"
find -name \*.png | xargs -n1 pngcrush -ow -fix
@ -151,10 +161,10 @@ cmake . \
-DCMAKE_C_FLAGS_RELEASE:STRING="-DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
%ifarch s390 s390x ppc %{power64}
%ifarch s390 s390x ppc %{power64} loongarch64 riscv64
-DENABLE_JIT=OFF \
%endif
%ifarch s390 s390x ppc %{power64}
%ifarch s390 s390x ppc %{power64} loongarch64 riscv64
-DUSE_SYSTEM_MALLOC=ON \
%endif
%{?docs:-DGENERATE_DOCUMENTATION=ON} \
@ -233,6 +243,21 @@ test -z "$(pkg-config --cflags Qt5WebKit | grep Qt5WebKit)"
%changelog
* Thu Sep 21 2023 Jingwiw <wangjingwei@iscas.ac.cn> - 5.212.0-10
- add riscv64 support for qt5-qtwebkit
* Wed Aug 02 2023 peijiankang <peijiankang@kylinos.cn> - 5.212.0-9
- fix build error
* Mon Dec 12 2022 Wenlong Zhang <zhangwenlong@loongson.cn> - 5.212.0-8
- add loongarch support for qt5-qtwebkit
* Tue May 10 2022 chenchen <chen_aka_jan@163.com> - 5.212.0-7
- License compliance rectification
* Thu Jan 13 2022 Ge Wang <wangge20@huawei.com> - 5.212.0-6
- fix build fail due to json.load dose not surport pramam encoding
* Thu July 23 2021 yangyunyi <yangyunyi2@huawei.com> - 5.212.0-5
- fix build fail with glib 2.68.1

11
qtwebkit-cstdint.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h.me qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h
--- qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h.me 2023-02-20 15:40:04.045911245 +0100
+++ qtwebkit-5.212.0-alpha4/Source/ThirdParty/ANGLE/src/common/mathutil.h 2023-02-20 15:40:39.038549787 +0100
@@ -16,6 +16,7 @@
#include <algorithm>
#include <string.h>
#include <stdlib.h>
+#include <cstdint>
namespace gl
{

View File

@ -0,0 +1,46 @@
From c7d19a492d97f9282a546831beb918e03315f6ef Mon Sep 17 00:00:00 2001
From: Adrian Perez de Castro <aperez@igalia.com>
Date: Wed, 15 Jan 2020 22:15:38 +0000
Subject: [PATCH] Offlineasm warnings with newer Ruby versions
https://bugs.webkit.org/show_bug.cgi?id=206233
Reviewed by Yusuke Suzuki.
Avoid a warning about using Object#=~ on Annotation instances, which
has been deprecated in Ruby 2.7.
* offlineasm/parser.rb: Swap checks to prevent applying the =~ operator
to Annotation instances, which do not define it.
Canonical link: https://commits.webkit.org/219400@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
---
Source/JavaScriptCore/ChangeLog | 13 +++++++++++++
Source/JavaScriptCore/offlineasm/parser.rb | 6 +++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/Source/JavaScriptCore/offlineasm/parser.rb b/Source/JavaScriptCore/offlineasm/parser.rb
index 791c81a9868d..f14c873e2dbd 100644
--- a/Source/JavaScriptCore/offlineasm/parser.rb
+++ b/Source/JavaScriptCore/offlineasm/parser.rb
@@ -628,9 +628,7 @@ def parseSequence(final, comment)
firstCodeOrigin = @tokens[@idx].codeOrigin
list = []
loop {
- if (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
- break
- elsif @tokens[@idx].is_a? Annotation
+ if @tokens[@idx].is_a? Annotation
# This is the only place where we can encounter a global
# annotation, and hence need to be able to distinguish between
# them.
@@ -644,6 +642,8 @@ def parseSequence(final, comment)
list << Instruction.new(codeOrigin, annotationOpcode, [], @tokens[@idx].string)
@annotation = nil
@idx += 2 # Consume the newline as well.
+ elsif (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
+ break
elsif @tokens[@idx] == "\n"
# ignore
@idx += 1