From 331c6eba932ad1f85d725bdd0b1b2d26dff89eb0 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Fri, 9 Aug 2024 03:03:26 -0400 Subject: [PATCH] dev-qt/qtwebengine: fix build with clang-19 Closes: https://bugs.gentoo.org/937541 Thanks-to: Alfred Wingate Signed-off-by: Ionen Wolkens --- .../files/qtwebengine-6.7.2-clang19.patch | 76 +++++++++++++++++++ dev-qt/qtwebengine/qtwebengine-6.7.2.ebuild | 1 + .../qtwebengine/qtwebengine-6.7.9999.ebuild | 1 + .../qtwebengine/qtwebengine-6.8.9999.ebuild | 1 + 4 files changed, 79 insertions(+) create mode 100644 dev-qt/qtwebengine/files/qtwebengine-6.7.2-clang19.patch diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.7.2-clang19.patch b/dev-qt/qtwebengine/files/qtwebengine-6.7.2-clang19.patch new file mode 100644 index 0000000000000..3951fa56605a7 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.7.2-clang19.patch @@ -0,0 +1,76 @@ +Patch status: fixed in >=chromium-127.0.6524.0 + +https://bugs.gentoo.org/937541 +https://github.com/google/perfetto/commit/e2f661907a717551235563389977b7468da6d45e +https://android-review.googlesource.com/c/platform/external/perfetto/+/3114454 +https://chromium-review.googlesource.com/c/chromium/src/+/5604664 +--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/hash_table.h ++++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/hash_table.h +@@ -1647,5 +1647,5 @@ + } + table_ = temporary_table; +- Allocator::template BackingWriteBarrier(&table_); ++ Allocator::BackingWriteBarrier(&table_); + + HashTableBucketInitializer::InitializeTable( +@@ -1701,5 +1701,5 @@ + // the current table has to be atomic to prevent races with concurrent marker. + AsAtomicPtr(&table_)->store(new_hash_table.table_, std::memory_order_relaxed); +- Allocator::template BackingWriteBarrier(&table_); ++ Allocator::BackingWriteBarrier(&table_); + table_size_ = new_table_size; + +@@ -1853,6 +1853,6 @@ + // there is *no* risk of data races when reading. + AtomicWriteSwap(table_, other.table_); +- Allocator::template BackingWriteBarrier(&table_); +- Allocator::template BackingWriteBarrier(&other.table_); ++ Allocator::BackingWriteBarrier(&table_); ++ Allocator::BackingWriteBarrier(&other.table_); + if (IsWeak::value) { + // Weak processing is omitted when no backing store is present. In case such +--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h ++++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h +@@ -329,5 +329,5 @@ + + static void Flush() { +- Base::template Trace([](typename Base::TraceContext ctx) { ctx.Flush(); }); ++ Base::Trace([](typename Base::TraceContext ctx) { ctx.Flush(); }); + } + +@@ -335,6 +335,5 @@ + static bool IsEnabled() { + bool enabled = false; +- Base::template CallIfEnabled( +- [&](uint32_t /*instances*/) { enabled = true; }); ++ Base::CallIfEnabled([&](uint32_t /*instances*/) { enabled = true; }); + return enabled; + } +@@ -350,5 +349,5 @@ + const DynamicCategory& dynamic_category) { + bool enabled = false; +- Base::template Trace([&](typename Base::TraceContext ctx) { ++ Base::Trace([&](typename Base::TraceContext ctx) { + enabled = enabled || IsDynamicCategoryEnabled(&ctx, dynamic_category); + }); +@@ -497,5 +496,5 @@ + PERFETTO_DCHECK(track.uuid == desc.uuid()); + TrackRegistry::Get()->UpdateTrack(track, desc.SerializeAsString()); +- Base::template Trace([&](typename Base::TraceContext ctx) { ++ Base::Trace([&](typename Base::TraceContext ctx) { + TrackEventInternal::WriteTrackDescriptor( + track, ctx.tls_inst_->trace_writer.get(), ctx.GetIncrementalState(), +@@ -1048,5 +1047,5 @@ + using CatTraits = CategoryTraits; + if (CatTraits::kIsDynamic) { +- Base::template TraceWithInstances(instances, std::move(lambda)); ++ Base::TraceWithInstances(instances, std::move(lambda)); + } else { + Base::template TraceWithInstances( +@@ -1062,5 +1061,5 @@ + std::function callback) { + TrackRegistry::Get()->UpdateTrack(track, std::move(callback)); +- Base::template Trace([&](typename Base::TraceContext ctx) { ++ Base::Trace([&](typename Base::TraceContext ctx) { + TrackEventInternal::WriteTrackDescriptor( + track, ctx.tls_inst_->trace_writer.get(), ctx.GetIncrementalState(), diff --git a/dev-qt/qtwebengine/qtwebengine-6.7.2.ebuild b/dev-qt/qtwebengine/qtwebengine-6.7.2.ebuild index 558e4e9ca86cc..652140a1537f9 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.7.2.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.7.2.ebuild @@ -111,6 +111,7 @@ PATCHES=( "${WORKDIR}"/patches/${PN} ) PATCHES+=( # add extras as needed here, may merge in set if carries across versions "${FILESDIR}"/${PN}-6.7.2-QTBUG-113574.patch + "${FILESDIR}"/${PN}-6.7.2-clang19.patch ) python_check_deps() { diff --git a/dev-qt/qtwebengine/qtwebengine-6.7.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.7.9999.ebuild index 73f482a28fcdf..084612a1d8457 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.7.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.7.9999.ebuild @@ -111,6 +111,7 @@ PATCHES=( "${WORKDIR}"/patches/${PN} ) PATCHES+=( # add extras as needed here, may merge in set if carries across versions "${FILESDIR}"/${PN}-6.7.2-QTBUG-113574.patch + "${FILESDIR}"/${PN}-6.7.2-clang19.patch ) python_check_deps() { diff --git a/dev-qt/qtwebengine/qtwebengine-6.8.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.8.9999.ebuild index 66f2a52045b60..894e87964fafe 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.8.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.8.9999.ebuild @@ -110,6 +110,7 @@ PATCHES=( "${WORKDIR}"/patches/${PN} ) PATCHES+=( # add extras as needed here, may merge in set if carries across versions + "${FILESDIR}"/${PN}-6.7.2-clang19.patch ) python_check_deps() {