diff --git a/0001-fix-build-error-with-gcc14.patch b/0001-fix-build-error-with-gcc14.patch new file mode 100644 index 0000000000000000000000000000000000000000..69c31d210ea2ddb941b5d6b5a7e6308ec5186e72 --- /dev/null +++ b/0001-fix-build-error-with-gcc14.patch @@ -0,0 +1,94 @@ +From ffcaa4acad3df5fb02b090fbde3434648cd6eb36 Mon Sep 17 00:00:00 2001 +From: Shangtong Guo +Date: Fri, 14 Nov 2025 04:33:50 -0500 +Subject: [PATCH] fix build error with gcc14 + +--- + .../parser/HTMLDocumentParserFastPath.cpp | 22 +++++++++++++++++++ + .../inline/text/TextUtil.cpp | 8 +++++++ + 2 files changed, 30 insertions(+) + +diff --git a/Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp b/Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp +index 880abf6b..fea817fc 100644 +--- a/Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp ++++ b/Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp +@@ -491,7 +491,12 @@ private: + // '\r' => 0000 1101 + constexpr simde_uint8x16_t lowNibbleMask { '\0', 0, 0, 0, 0, 0, '&', 0, 0, 0, 0, 0, '<', '\r', 0, 0 }; + constexpr simde_uint8x16_t v0f = SIMD::splat8(0x0f); ++#if defined(SIMDE_RISCV_V_NATIVE) ++ auto inputConverted = simde_vandq_u8(input, v0f); ++ return SIMD::equal(simde_vqtbl1q_u8(lowNibbleMask, inputConverted), input); ++#else + return SIMD::equal(simde_vqtbl1q_u8(lowNibbleMask, SIMD::bitAnd(input, v0f)), input); ++#endif + }; + + std::span cursor; +@@ -505,7 +510,13 @@ private: + WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN + auto vectorMatch = [&](auto input) ALWAYS_INLINE_LAMBDA { + constexpr simde_uint8x16_t zeros = SIMD::splat8(0); ++#if defined(SIMDE_RISCV_V_NATIVE) ++ auto firstVector = vectorEquals8Bit(input.val[0]); ++ auto secondVector = SIMD::equal(input.val[1], zeros); ++ return SIMD::findFirstNonZeroIndex(SIMD::bitAnd(firstVector, secondVector)); ++#else + return SIMD::findFirstNonZeroIndex(SIMD::bitAnd(vectorEquals8Bit(input.val[0]), SIMD::equal(input.val[1], zeros))); ++#endif + }; + WTF_ALLOW_UNSAFE_BUFFER_USAGE_END + auto* it = SIMD::findInterleaved(start, vectorMatch, scalarMatch); +@@ -653,7 +664,12 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_END + // '\r' => 0000 1101 + constexpr auto lowNibbleMask = quoteChar == '\'' ? simde_uint8x16_t { '\0', 0, 0, 0, 0, 0, '&', '\'', 0, 0, 0, 0, 0, '\r', 0, 0 } : simde_uint8x16_t { '\0', 0, '"', 0, 0, 0, '&', 0, 0, 0, 0, 0, 0, '\r', 0, 0 }; + constexpr auto v0f = SIMD::splat8(0x0f); ++#if defined(SIMDE_RISCV_V_NATIVE) ++ auto inputConverted = simde_vandq_u8(input, v0f); ++ return SIMD::equal(simde_vqtbl1q_u8(lowNibbleMask, inputConverted), input); ++#else + return SIMD::equal(simde_vqtbl1q_u8(lowNibbleMask, SIMD::bitAnd(input, v0f)), input); ++#endif + }; + + if constexpr (sizeof(CharacterType) == 1) { +@@ -666,7 +682,13 @@ WTF_ALLOW_UNSAFE_BUFFER_USAGE_END + WTF_ALLOW_UNSAFE_BUFFER_USAGE_BEGIN + auto vectorMatch = [&](auto input) ALWAYS_INLINE_LAMBDA { + constexpr simde_uint8x16_t zeros = SIMD::splat8(0); ++#if defined(SIMDE_RISCV_V_NATIVE) ++ auto firstVector = vectorEquals8Bit(input.val[0]); ++ auto secondVector = SIMD::equal(input.val[1], zeros); ++ return SIMD::findFirstNonZeroIndex(SIMD::bitAnd(firstVector, secondVector)); ++#else + return SIMD::findFirstNonZeroIndex(SIMD::bitAnd(vectorEquals8Bit(input.val[0]), SIMD::equal(input.val[1], zeros))); ++#endif + }; + WTF_ALLOW_UNSAFE_BUFFER_USAGE_END + auto* it = SIMD::findInterleaved(span, vectorMatch, scalarMatch); +diff --git a/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp b/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp +index ff021918..71b118f8 100644 +--- a/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp ++++ b/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp +@@ -545,10 +545,18 @@ bool TextUtil::containsStrongDirectionalityText(StringView text) + auto cond0 = SIMD::lessThan(input, c0590); + // General Punctuation such as curly quotes. + // ch >= 0x2010 && ch <= 0x2029 ++#if defined(SIMDE_RISCV_V_NATIVE) ++ auto cond1 = simde_vandq_u16(SIMD::greaterThanOrEqual(input, c2010), SIMD::lessThanOrEqual(input, c2029)); ++#else + auto cond1 = SIMD::bitAnd(SIMD::greaterThanOrEqual(input, c2010), SIMD::lessThanOrEqual(input, c2029)); ++#endif + // CJK etc., up to Surrogate Pairs. + // ch >= 0x206A && ch <= 0xD7FF ++#if defined(SIMDE_RISCV_V_NATIVE) ++ auto cond2 = simde_vandq_u16(SIMD::greaterThanOrEqual(input, c206A), SIMD::lessThanOrEqual(input, cD7FF)); ++#else + auto cond2 = SIMD::bitAnd(SIMD::greaterThanOrEqual(input, c206A), SIMD::lessThanOrEqual(input, cD7FF)); ++#endif + // Common in CJK. + // ch >= 0xFF00 && ch <= 0xFFFF + auto cond3 = SIMD::greaterThanOrEqual(input, cFF00); +-- +2.41.0 + diff --git a/webkitgtk.spec b/webkitgtk.spec index 16256bd07cc58bf7327e7af5173fb65b23a6af39..718b639cb7295e5e0dc06a8f486170ee8f653a37 100644 --- a/webkitgtk.spec +++ b/webkitgtk.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 ## NOTE: Lots of files in various subdirectories have the same name (such as ## "LICENSE") so this short macro allows us to distinguish them by using their @@ -26,6 +26,7 @@ Source0: https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz Source1: https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz.asc Patch01: riscv-use-unknown-cpu.patch +Patch02: 0001-fix-build-error-with-gcc14.patch BuildRequires: bison @@ -259,6 +260,15 @@ files for developing applications that use JavaScript engine from webkit2gtk-4.1 %global optflags %(echo %{optflags} | sed 's/-mbranch-protection=standard /-mbranch-protection=pac-ret /') %endif +%ifarch riscv64 +%define gcc_version %(gcc -dumpversion | cut -d. -f1) +%if "%{gcc_version}" == "14" +%global optflags %(echo '%{optflags}' | sed 's/-O2/-O1/g; s/-O3/-O1/g') -D__riscv_v_fixed_vlen=128 -mrvv-vector-bits=zvl +export CFLAGS="${CFLAGS/-flto=auto/}" +export CXXFLAGS="${CXXFLAGS/-flto=auto/}" +%endif +%endif + %define _vpath_builddir %{_vendor}-%{_target_os}-build/webkitgtk-6.0 %cmake \ -GNinja \ @@ -455,6 +465,9 @@ export NINJA_STATUS="[2/2][%f/%t %es] " %endif %changelog +* Wed Nov 19 2025 Shangtong Guo - 2.48.5-2 +- fix build error with gcc14 + * Tue Sep 23 2025 wh02252983 - 2.48.5-1 - update to 2.48.5 to fix CVE-2025-31273 CVE-2025-31278 CVE-2025-43212 - CVE-2025-43216 CVE-2025-6558 CVE-2025-43211 CVE-2025-43227 CVE-2025-43228