www/webkit2-gtk3: fix build with clang 19
Clang 19 now implements CWG 96 [1], which requires a template argument
list after a 'template' keyword, resulting in errors similar to:
/wrkdirs/usr/ports/www/webkit2-gtk3/work/webkitgtk-2.34.6/Source/JavaScriptCore/assembler/AbstractMacroAssembler.h:974:65: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
974 | AssemblerType::repatchCompact(dataLabelCompact.template dataLocation(), value);
| ^
In these cases, appending "<>" is enough to satisfy the constraint.
Upstream has committed a fix to their main branch [2], but since some
code has moved around, and other functions have been removed, it does
not apply cleanly to 2.34.6. Therefore, apply only the necessary fixes
manually for now.
[1] https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#96
[2] https://github.com/WebKit/WebKit/commit/62b6e2db547e
PR: 280728
Approved by: fluffy (maintainer)
MFH: 2024Q3
This commit is contained in:
parent
cb48177db9
commit
743cdc3096
@ -0,0 +1,11 @@
|
||||
--- Source/JavaScriptCore/assembler/AbstractMacroAssembler.h.orig 2021-10-21 08:52:07 UTC
|
||||
+++ Source/JavaScriptCore/assembler/AbstractMacroAssembler.h
|
||||
@@ -971,7 +971,7 @@ class AbstractMacroAssembler : public AbstractMacroAss
|
||||
template<PtrTag tag>
|
||||
static void repatchCompact(CodeLocationDataLabelCompact<tag> dataLabelCompact, int32_t value)
|
||||
{
|
||||
- AssemblerType::repatchCompact(dataLabelCompact.template dataLocation(), value);
|
||||
+ AssemblerType::repatchCompact(dataLabelCompact.template dataLocation<>(), value);
|
||||
}
|
||||
|
||||
template<PtrTag tag>
|
||||
@ -0,0 +1,56 @@
|
||||
--- Source/JavaScriptCore/llint/LLIntData.h.orig 2021-10-21 08:52:07 UTC
|
||||
+++ Source/JavaScriptCore/llint/LLIntData.h
|
||||
@@ -217,7 +217,7 @@ ALWAYS_INLINE LLIntCode getCodeFunctionPtr(OpcodeID op
|
||||
#if COMPILER(MSVC)
|
||||
return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).executableAddress());
|
||||
#else
|
||||
- return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template executableAddress());
|
||||
+ return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template executableAddress<>());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ ALWAYS_INLINE LLIntCode getWide16CodeFunctionPtr(Opcod
|
||||
#if COMPILER(MSVC)
|
||||
return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).executableAddress());
|
||||
#else
|
||||
- return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).template executableAddress());
|
||||
+ return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).template executableAddress<>());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ ALWAYS_INLINE LLIntCode getWide32CodeFunctionPtr(Opcod
|
||||
#if COMPILER(MSVC)
|
||||
return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).executableAddress());
|
||||
#else
|
||||
- return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).template executableAddress());
|
||||
+ return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).template executableAddress<>());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@ ALWAYS_INLINE LLIntCode getCodeFunctionPtr(WasmOpcodeI
|
||||
#if COMPILER(MSVC)
|
||||
return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).executableAddress());
|
||||
#else
|
||||
- return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template executableAddress());
|
||||
+ return reinterpret_cast<LLIntCode>(getCodePtr<tag>(opcodeID).template executableAddress<>());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ ALWAYS_INLINE LLIntCode getWide16CodeFunctionPtr(WasmO
|
||||
#if COMPILER(MSVC)
|
||||
return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).executableAddress());
|
||||
#else
|
||||
- return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).template executableAddress());
|
||||
+ return reinterpret_cast<LLIntCode>(getWide16CodePtr<tag>(opcodeID).template executableAddress<>());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -348,7 +348,7 @@ ALWAYS_INLINE LLIntCode getWide32CodeFunctionPtr(WasmO
|
||||
#if COMPILER(MSVC)
|
||||
return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).executableAddress());
|
||||
#else
|
||||
- return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).template executableAddress());
|
||||
+ return reinterpret_cast<LLIntCode>(getWide32CodePtr<tag>(opcodeID).template executableAddress<>());
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
--- Source/JavaScriptCore/runtime/JSCast.h.orig 2021-10-21 08:52:07 UTC
|
||||
+++ Source/JavaScriptCore/runtime/JSCast.h
|
||||
@@ -171,7 +171,7 @@ bool inherits(VM& vm, From* from)
|
||||
bool inherits(VM& vm, From* from)
|
||||
{
|
||||
using Dispatcher = InheritsTraits<Target>;
|
||||
- return Dispatcher::template inherits(vm, from);
|
||||
+ return Dispatcher::template inherits<>(vm, from);
|
||||
}
|
||||
|
||||
} // namespace JSCastingHelpers
|
||||
@@ -180,7 +180,7 @@ To jsDynamicCast(VM& vm, From* from)
|
||||
To jsDynamicCast(VM& vm, From* from)
|
||||
{
|
||||
using Dispatcher = JSCastingHelpers::InheritsTraits<typename std::remove_cv<typename std::remove_pointer<To>::type>::type>;
|
||||
- if (LIKELY(Dispatcher::template inherits(vm, from)))
|
||||
+ if (LIKELY(Dispatcher::template inherits<>(vm, from)))
|
||||
return static_cast<To>(from);
|
||||
return nullptr;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user