Compare commits
10 Commits
4a5c0d4c59
...
a14a892b70
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a14a892b70 | ||
|
|
8df5af7a15 | ||
|
|
8081faeb2e | ||
|
|
b7db11927f | ||
|
|
d83af46b1e | ||
|
|
5db41550a7 | ||
|
|
c5f08d50ad | ||
|
|
e940be0015 | ||
|
|
0d6f570f06 | ||
|
|
247ca392ba |
79
0001-add-loongarch-support-for-qtwebkit.patch
Normal file
79
0001-add-loongarch-support-for-qtwebkit.patch
Normal 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
|
||||
|
||||
117
0001-add-riscv64-support.patch
Normal file
117
0001-add-riscv64-support.patch
Normal 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'} || "");
|
||||
}
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
|
||||
Name: qt5-%{qt_module}
|
||||
Version: 5.212.0
|
||||
Release: 6
|
||||
Release: 11
|
||||
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
|
||||
|
||||
@ -28,6 +28,15 @@ 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
|
||||
Patch10: qt5-webkit-add-sw64-support.patch
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: cmake
|
||||
@ -153,10 +162,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 sw_64
|
||||
-DENABLE_JIT=OFF \
|
||||
%endif
|
||||
%ifarch s390 s390x ppc %{power64}
|
||||
%ifarch s390 s390x ppc %{power64} loongarch64 riscv64 sw_64
|
||||
-DUSE_SYSTEM_MALLOC=ON \
|
||||
%endif
|
||||
%{?docs:-DGENERATE_DOCUMENTATION=ON} \
|
||||
@ -235,6 +244,21 @@ test -z "$(pkg-config --cflags Qt5WebKit | grep Qt5WebKit)"
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 05 2025 yueyuankun <yueyuankun@kylinos.cn> - 5.212.0-11
|
||||
- add sw_64 support for qt5-qtwebkit
|
||||
|
||||
* 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
|
||||
|
||||
|
||||
79
qt5-webkit-add-sw64-support.patch
Normal file
79
qt5-webkit-add-sw64-support.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From 9b0212d104ca5b74965b51514347c36aa845cb1a Mon Sep 17 00:00:00 2001
|
||||
From: yueyuankun <yueyuankun@kylinos.cn>
|
||||
Date: Wed, 5 Mar 2025 15:45:41 +0800
|
||||
Subject: [PATCH] add sw_64 support for qt5-webkit
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 ++
|
||||
Source/JavaScriptCore/CMakeLists.txt | 1 +
|
||||
Source/WTF/wtf/Platform.h | 8 +++++++-
|
||||
Source/WTF/wtf/dtoa/utils.h | 2 +-
|
||||
4 files changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 77687d3..d3f697a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -92,6 +92,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64")
|
||||
set(WTF_CPU_LOONGARCH64 1)
|
||||
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
|
||||
set(WTF_CPU_RISCV64 1)
|
||||
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "sw_64")
|
||||
+ set(WTF_CPU_SW_64 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 ed35b54..b620948 100644
|
||||
--- a/Source/JavaScriptCore/CMakeLists.txt
|
||||
+++ b/Source/JavaScriptCore/CMakeLists.txt
|
||||
@@ -1291,6 +1291,7 @@ elseif (WTF_CPU_X86)
|
||||
elseif (WTF_CPU_LOONGARCH64)
|
||||
elseif (WTF_CPU_RISCV64)
|
||||
elseif (WTF_CPU_X86_64)
|
||||
+elseif (WTF_CPU_SW_64)
|
||||
if (MSVC AND ENABLE_JIT)
|
||||
add_custom_command(
|
||||
OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
|
||||
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
|
||||
index 338fddc..3002ffb 100644
|
||||
--- a/Source/WTF/wtf/Platform.h
|
||||
+++ b/Source/WTF/wtf/Platform.h
|
||||
@@ -185,6 +185,11 @@
|
||||
#define WTF_CPU_RISCV64 1
|
||||
#endif
|
||||
|
||||
+/* CPU(SW_64) - SW_64 */
|
||||
+#if defined(__sw_64)
|
||||
+#define WTF_CPU_SW_64 1
|
||||
+#endif
|
||||
+
|
||||
/* CPU(ARM64) - Apple */
|
||||
#if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__)
|
||||
#define WTF_CPU_ARM64 1
|
||||
@@ -718,7 +723,8 @@
|
||||
|| CPU(PPC64) \
|
||||
|| CPU(PPC64LE) \
|
||||
|| CPU(RISCV64) \
|
||||
- || CPU(LOONGARCH64)
|
||||
+ || CPU(LOONGARCH64) \
|
||||
+ || CPU(SW_64)
|
||||
#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 b136162..6dc3843 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) || 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(LOONGARCH64) || CPU(RISCV64) || CPU(SW_64)
|
||||
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
|
||||
#elif defined(_M_IX86) || defined(__i386__)
|
||||
#if defined(_WIN32)
|
||||
--
|
||||
2.43.0
|
||||
|
||||
11
qtwebkit-cstdint.patch
Normal file
11
qtwebkit-cstdint.patch
Normal 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
|
||||
{
|
||||
46
webkit-offlineasm-warnings-ruby27.patch
Normal file
46
webkit-offlineasm-warnings-ruby27.patch
Normal 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
|
||||
Loading…
x
Reference in New Issue
Block a user