diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-09-03 19:59:01 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-09-03 22:33:21 -0700 |
| commit | 8ac78b42bb455074fcba7915c007731c9c4fc88c (patch) | |
| tree | 136ef6389ac119fd07cde10b63ed53ece0fcfcf9 | |
| parent | dd82970c6032ed806fb8ad41911c390f3a01ed7f (diff) | |
| download | meta-openembedded-8ac78b42bb455074fcba7915c007731c9c4fc88c.tar.gz | |
webkitgtk3: Fix build with latest clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-build-issues-with-latest-Clang.patch | 237 | ||||
| -rw-r--r-- | meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb | 1 |
2 files changed, 238 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-build-issues-with-latest-Clang.patch b/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-build-issues-with-latest-Clang.patch new file mode 100644 index 0000000000..6ef9835c2c --- /dev/null +++ b/meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Fix-build-issues-with-latest-Clang.patch | |||
| @@ -0,0 +1,237 @@ | |||
| 1 | From 257ed304fb3e71d412568dcbed7129c145812fdf Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 2 Sep 2024 21:38:12 -0700 | ||
| 4 | Subject: [PATCH] Fix build issues with latest Clang | ||
| 5 | https://bugs.webkit.org/show_bug.cgi?id=276198 rdar://130933637 | ||
| 6 | |||
| 7 | Reviewed by Yusuke Suzuki. | ||
| 8 | |||
| 9 | The use of the template keyword to reference template members without a template argument list was deprecated in the C++ standard. | ||
| 10 | e.g. `foo.template bar()` nows needs to be `foo.template bar<>()`. I ran into a different issue with `std::reference_wrapper` that | ||
| 11 | blocked me from going any further, which AFAICT is a bug on the Clang side. | ||
| 12 | |||
| 13 | This also fixes a few other warnings that popped up while building with the new Clang denoted inline | ||
| 14 | |||
| 15 | * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: | ||
| 16 | (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): Clang didn't like the implicit static_cast<int32_t>(UINT32_MAX) so make it explicit with a static_assert no data was lost. | ||
| 17 | * Source/JavaScriptCore/jit/AssemblyHelpers.cpp: | ||
| 18 | (JSC::AssemblyHelpers::emitNonNullDecodeZeroExtendedStructureID): Clang didn't like the implicit static_cast<int32_t>(UINT32_MAX) so make it explicit with a static_assert no data was lost. | ||
| 19 | * Source/JavaScriptCore/llint/InPlaceInterpreter.cpp: | ||
| 20 | * Source/JavaScriptCore/llint/LLIntData.h: | ||
| 21 | (JSC::LLInt::getCodeFunctionPtr): | ||
| 22 | (JSC::LLInt::getWide16CodeFunctionPtr): | ||
| 23 | (JSC::LLInt::getWide32CodeFunctionPtr): | ||
| 24 | * Source/JavaScriptCore/parser/Nodes.h: Missing definition of ModuleScopeData added include. | ||
| 25 | * Source/JavaScriptCore/runtime/JSCast.h: | ||
| 26 | (JSC::JSCastingHelpers::inherits): | ||
| 27 | (JSC::jsDynamicCast): | ||
| 28 | * Source/ThirdParty/libwebrtc/Source/third_party/boringssl/src/crypto/bio/connect.c: | ||
| 29 | (conn_callback_ctrl): Had a warning about an incompatible function type. Seems like this is intentional suppressed the warning. | ||
| 30 | * Source/WTF/wtf/cf/TypeCastsCF.h: Had a warning about extra namespace qualification. I just moved it out of the namespace. That said, it feels like this warning shouldn't apply to macro expansions... | ||
| 31 | * Source/WebCore/PAL/ThirdParty/libavif/ThirdParty/dav1d/src/decode.c: | ||
| 32 | (decode_b): Had a warning about different types on the middle/right of a ternary expression. I just pushed the comparison inside the ternary. | ||
| 33 | |||
| 34 | Canonical link: https://commits.webkit.org/280700@main | ||
| 35 | |||
| 36 | Upstream-Status: Backport [https://github.com/WebKit/WebKit/commit/62b6e2db547e#diff-136d848d7c1b400da9b486916b67592b54e5abf7c66ac247697a93ae2fb743a9] | ||
| 37 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 38 | --- | ||
| 39 | Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp | 6 ++++-- | ||
| 40 | Source/JavaScriptCore/jit/AssemblyHelpers.cpp | 6 ++++-- | ||
| 41 | .../JavaScriptCore/llint/InPlaceInterpreter.cpp | 16 ++++++++-------- | ||
| 42 | Source/JavaScriptCore/llint/LLIntData.h | 12 ++++++------ | ||
| 43 | Source/JavaScriptCore/llint/LLIntThunks.cpp | 2 +- | ||
| 44 | Source/JavaScriptCore/parser/Nodes.h | 4 ++-- | ||
| 45 | Source/JavaScriptCore/runtime/JSCast.h | 4 ++-- | ||
| 46 | 7 files changed, 27 insertions(+), 23 deletions(-) | ||
| 47 | |||
| 48 | --- a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp | ||
| 49 | +++ b/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp | ||
| 50 | @@ -22930,8 +22930,10 @@ IGNORE_CLANG_WARNINGS_END | ||
| 51 | return m_out.shl(m_out.zeroExtPtr(structureID), m_out.constIntPtr(StructureID::encodeShiftAmount)); | ||
| 52 | #else | ||
| 53 | LValue maskedStructureID = structureID; | ||
| 54 | - if constexpr (structureHeapAddressSize < 4 * GB) | ||
| 55 | - maskedStructureID = m_out.bitAnd(structureID, m_out.constInt32(StructureID::structureIDMask)); | ||
| 56 | + if constexpr (structureHeapAddressSize < 4 * GB) { | ||
| 57 | + static_assert(static_cast<uint32_t>(StructureID::structureIDMask) == StructureID::structureIDMask); | ||
| 58 | + maskedStructureID = m_out.bitAnd(structureID, m_out.constInt32(static_cast<uint32_t>(StructureID::structureIDMask))); | ||
| 59 | + } | ||
| 60 | return m_out.bitOr(m_out.constIntPtr(startOfStructureHeap()), m_out.zeroExtPtr(maskedStructureID)); | ||
| 61 | #endif | ||
| 62 | } | ||
| 63 | --- a/Source/JavaScriptCore/jit/AssemblyHelpers.cpp | ||
| 64 | +++ b/Source/JavaScriptCore/jit/AssemblyHelpers.cpp | ||
| 65 | @@ -677,8 +677,10 @@ void AssemblyHelpers::emitNonNullDecodeZ | ||
| 66 | if constexpr (structureHeapAddressSize >= 4 * GB) { | ||
| 67 | ASSERT(structureHeapAddressSize == 4 * GB); | ||
| 68 | move(source, dest); | ||
| 69 | - } else | ||
| 70 | - and32(TrustedImm32(StructureID::structureIDMask), source, dest); | ||
| 71 | + } else { | ||
| 72 | + static_assert(static_cast<uint32_t>(StructureID::structureIDMask) == StructureID::structureIDMask); | ||
| 73 | + and32(TrustedImm32(static_cast<uint32_t>(StructureID::structureIDMask)), source, dest); | ||
| 74 | + } | ||
| 75 | or64(TrustedImm64(startOfStructureHeap()), dest); | ||
| 76 | #else // not CPU(ADDRESS64) | ||
| 77 | move(source, dest); | ||
| 78 | --- a/Source/JavaScriptCore/llint/InPlaceInterpreter.cpp | ||
| 79 | +++ b/Source/JavaScriptCore/llint/InPlaceInterpreter.cpp | ||
| 80 | @@ -43,8 +43,8 @@ namespace JSC { namespace IPInt { | ||
| 81 | do { \ | ||
| 82 | void* base = reinterpret_cast<void*>(ipint_unreachable_validate); \ | ||
| 83 | void* ptr = reinterpret_cast<void*>(ipint_ ## name ## _validate); \ | ||
| 84 | - void* untaggedBase = CodePtr<CFunctionPtrTag>::fromTaggedPtr(base).template untaggedPtr(); \ | ||
| 85 | - void* untaggedPtr = CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr(); \ | ||
| 86 | + void* untaggedBase = CodePtr<CFunctionPtrTag>::fromTaggedPtr(base).template untaggedPtr<>(); \ | ||
| 87 | + void* untaggedPtr = CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr<>(); \ | ||
| 88 | RELEASE_ASSERT_WITH_MESSAGE((char*)(untaggedPtr) - (char*)(untaggedBase) == opcode * 256, #name); \ | ||
| 89 | } while (false); | ||
| 90 | |||
| 91 | @@ -52,8 +52,8 @@ do { \ | ||
| 92 | do { \ | ||
| 93 | void* base = reinterpret_cast<void*>(ipint_i32_trunc_sat_f32_s_validate); \ | ||
| 94 | void* ptr = reinterpret_cast<void*>(ipint_ ## name ## _validate); \ | ||
| 95 | - void* untaggedBase = CodePtr<CFunctionPtrTag>::fromTaggedPtr(base).template untaggedPtr(); \ | ||
| 96 | - void* untaggedPtr = CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr(); \ | ||
| 97 | + void* untaggedBase = CodePtr<CFunctionPtrTag>::fromTaggedPtr(base).template untaggedPtr<>(); \ | ||
| 98 | + void* untaggedPtr = CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr<>(); \ | ||
| 99 | RELEASE_ASSERT_WITH_MESSAGE((char*)(untaggedPtr) - (char*)(untaggedBase) == opcode * 256, #name); \ | ||
| 100 | } while (false); | ||
| 101 | |||
| 102 | @@ -61,8 +61,8 @@ do { \ | ||
| 103 | do { \ | ||
| 104 | void* base = reinterpret_cast<void*>(ipint_simd_v128_load_mem_validate); \ | ||
| 105 | void* ptr = reinterpret_cast<void*>(ipint_ ## name ## _validate); \ | ||
| 106 | - void* untaggedBase = CodePtr<CFunctionPtrTag>::fromTaggedPtr(base).template untaggedPtr(); \ | ||
| 107 | - void* untaggedPtr = CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr(); \ | ||
| 108 | + void* untaggedBase = CodePtr<CFunctionPtrTag>::fromTaggedPtr(base).template untaggedPtr<>(); \ | ||
| 109 | + void* untaggedPtr = CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr<>(); \ | ||
| 110 | RELEASE_ASSERT_WITH_MESSAGE((char*)(untaggedPtr) - (char*)(untaggedBase) == opcode * 256, #name); \ | ||
| 111 | } while (false); | ||
| 112 | |||
| 113 | @@ -70,8 +70,8 @@ do { \ | ||
| 114 | do { \ | ||
| 115 | void* base = reinterpret_cast<void*>(ipint_memory_atomic_notify_validate); \ | ||
| 116 | void* ptr = reinterpret_cast<void*>(ipint_ ## name ## _validate); \ | ||
| 117 | - void* untaggedBase = CodePtr<CFunctionPtrTag>::fromTaggedPtr(base).template untaggedPtr(); \ | ||
| 118 | - void* untaggedPtr = CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr(); \ | ||
| 119 | + void* untaggedBase = CodePtr<CFunctionPtrTag>::fromTaggedPtr(base).template untaggedPtr<>(); \ | ||
| 120 | + void* untaggedPtr = CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr<>(); \ | ||
| 121 | RELEASE_ASSERT_WITH_MESSAGE((char*)(untaggedPtr) - (char*)(untaggedBase) == opcode * 256, #name); \ | ||
| 122 | } while (false); | ||
| 123 | |||
| 124 | --- a/Source/JavaScriptCore/llint/LLIntData.h | ||
| 125 | +++ b/Source/JavaScriptCore/llint/LLIntData.h | ||
| 126 | @@ -217,7 +217,7 @@ ALWAYS_INLINE LLIntCode getCodeFunctionP | ||
| 127 | #if COMPILER(MSVC) | ||
| 128 | return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).taggedPtr()); | ||
| 129 | #else | ||
| 130 | - return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template taggedPtr()); | ||
| 131 | + return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template taggedPtr<>()); | ||
| 132 | #endif | ||
| 133 | } | ||
| 134 | |||
| 135 | @@ -227,7 +227,7 @@ ALWAYS_INLINE LLIntCode getWide16CodeFun | ||
| 136 | #if COMPILER(MSVC) | ||
| 137 | return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).taggedPtr()); | ||
| 138 | #else | ||
| 139 | - return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).template taggedPtr()); | ||
| 140 | + return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).template taggedPtr<>()); | ||
| 141 | #endif | ||
| 142 | } | ||
| 143 | |||
| 144 | @@ -237,7 +237,7 @@ ALWAYS_INLINE LLIntCode getWide32CodeFun | ||
| 145 | #if COMPILER(MSVC) | ||
| 146 | return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).taggedPtr()); | ||
| 147 | #else | ||
| 148 | - return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).template taggedPtr()); | ||
| 149 | + return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).template taggedPtr<>()); | ||
| 150 | #endif | ||
| 151 | } | ||
| 152 | #else // not ENABLE(JIT) | ||
| 153 | @@ -361,7 +361,7 @@ ALWAYS_INLINE LLIntCode getCodeFunctionP | ||
| 154 | #if COMPILER(MSVC) | ||
| 155 | return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).taggedPtr()); | ||
| 156 | #else | ||
| 157 | - return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template taggedPtr()); | ||
| 158 | + return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template taggedPtr<>()); | ||
| 159 | #endif | ||
| 160 | } | ||
| 161 | |||
| 162 | @@ -371,7 +371,7 @@ ALWAYS_INLINE LLIntCode getWide16CodeFun | ||
| 163 | #if COMPILER(MSVC) | ||
| 164 | return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).taggedPtr()); | ||
| 165 | #else | ||
| 166 | - return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).template taggedPtr()); | ||
| 167 | + return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).template taggedPtr<>()); | ||
| 168 | #endif | ||
| 169 | } | ||
| 170 | |||
| 171 | @@ -381,7 +381,7 @@ ALWAYS_INLINE LLIntCode getWide32CodeFun | ||
| 172 | #if COMPILER(MSVC) | ||
| 173 | return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).taggedPtr()); | ||
| 174 | #else | ||
| 175 | - return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).template taggedPtr()); | ||
| 176 | + return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).template taggedPtr<>()); | ||
| 177 | #endif | ||
| 178 | } | ||
| 179 | #else // not ENABLE(JIT) | ||
| 180 | --- a/Source/JavaScriptCore/llint/LLIntThunks.cpp | ||
| 181 | +++ b/Source/JavaScriptCore/llint/LLIntThunks.cpp | ||
| 182 | @@ -227,7 +227,7 @@ ALWAYS_INLINE void* untaggedPtr(void* pt | ||
| 183 | #if COMPILER(MSVC) | ||
| 184 | return CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).untaggedPtr(); | ||
| 185 | #else | ||
| 186 | - return CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr(); | ||
| 187 | + return CodePtr<CFunctionPtrTag>::fromTaggedPtr(ptr).template untaggedPtr<>(); | ||
| 188 | #endif | ||
| 189 | } | ||
| 190 | |||
| 191 | --- a/Source/JavaScriptCore/parser/Nodes.h | ||
| 192 | +++ b/Source/JavaScriptCore/parser/Nodes.h | ||
| 193 | @@ -1,7 +1,7 @@ | ||
| 194 | /* | ||
| 195 | * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) | ||
| 196 | * Copyright (C) 2001 Peter Kelly (pmk@post.com) | ||
| 197 | - * Copyright (C) 2003-2019 Apple Inc. All rights reserved. | ||
| 198 | + * Copyright (C) 2003-2024 Apple Inc. All rights reserved. | ||
| 199 | * Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) | ||
| 200 | * Copyright (C) 2007 Maks Orlovich | ||
| 201 | * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | ||
| 202 | @@ -29,6 +29,7 @@ | ||
| 203 | #include "ImplementationVisibility.h" | ||
| 204 | #include "JITCode.h" | ||
| 205 | #include "Label.h" | ||
| 206 | +#include "ModuleScopeData.h" | ||
| 207 | #include "ParserArena.h" | ||
| 208 | #include "ParserModes.h" | ||
| 209 | #include "ParserTokens.h" | ||
| 210 | @@ -49,7 +50,6 @@ namespace JSC { | ||
| 211 | class FunctionMetadataNode; | ||
| 212 | class FunctionParameters; | ||
| 213 | class ModuleAnalyzer; | ||
| 214 | - class ModuleScopeData; | ||
| 215 | class PropertyListNode; | ||
| 216 | class ReadModifyResolveNode; | ||
| 217 | class RegisterID; | ||
| 218 | --- a/Source/JavaScriptCore/runtime/JSCast.h | ||
| 219 | +++ b/Source/JavaScriptCore/runtime/JSCast.h | ||
| 220 | @@ -236,7 +236,7 @@ template<typename Target, typename From> | ||
| 221 | bool inherits(From* from) | ||
| 222 | { | ||
| 223 | using Dispatcher = InheritsTraits<Target>; | ||
| 224 | - return Dispatcher::template inherits(from); | ||
| 225 | + return Dispatcher::template inherits<>(from); | ||
| 226 | } | ||
| 227 | |||
| 228 | } // namespace JSCastingHelpers | ||
| 229 | @@ -245,7 +245,7 @@ template<typename To, typename From> | ||
| 230 | To jsDynamicCast(From* from) | ||
| 231 | { | ||
| 232 | using Dispatcher = JSCastingHelpers::InheritsTraits<typename std::remove_cv<typename std::remove_pointer<To>::type>::type>; | ||
| 233 | - if (LIKELY(Dispatcher::template inherits(from))) | ||
| 234 | + if (LIKELY(Dispatcher::template inherits<>(from))) | ||
| 235 | return static_cast<To>(from); | ||
| 236 | return nullptr; | ||
| 237 | } | ||
diff --git a/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb b/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb index 7d70cbda78..9493d86422 100644 --- a/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb +++ b/meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb | |||
| @@ -15,6 +15,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/webkitgtk-${PV}.tar.xz \ | |||
| 15 | file://no-musttail-arm.patch \ | 15 | file://no-musttail-arm.patch \ |
| 16 | file://0001-LowLevelInterpreter.cpp-339-21-error-t6-was-not-decl.patch \ | 16 | file://0001-LowLevelInterpreter.cpp-339-21-error-t6-was-not-decl.patch \ |
| 17 | file://30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch \ | 17 | file://30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch \ |
| 18 | file://0001-Fix-build-issues-with-latest-Clang.patch \ | ||
| 18 | " | 19 | " |
| 19 | SRC_URI[sha256sum] = "dc82d042ecaca981a4852357c06e5235743319cf10a94cd36ad41b97883a0b54" | 20 | SRC_URI[sha256sum] = "dc82d042ecaca981a4852357c06e5235743319cf10a94cd36ad41b97883a0b54" |
| 20 | 21 | ||
