From 07befea8a73bf3c0e4028e171e0b8a1a2405f826 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 2 Mar 2024 09:11:43 -0800 Subject: [PATCH] qtwebengine: Fix build with clang18 Change-Id: I5ddb209380fbcd1bd05c605bd322a7f75c672b7b --- recipes-qt/qt6/qtwebengine.inc | 1 + .../0003-qtwebengine-6.7.0-clang18.patch | 108 ++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 recipes-qt/qt6/qtwebengine/chromium/0003-qtwebengine-6.7.0-clang18.patch diff --git a/recipes-qt/qt6/qtwebengine.inc b/recipes-qt/qt6/qtwebengine.inc index dca64c20..2de87fb9 100644 --- a/recipes-qt/qt6/qtwebengine.inc +++ b/recipes-qt/qt6/qtwebengine.inc @@ -36,5 +36,6 @@ SRC_URI += " \ SRC_URI += " \ file://chromium/0001-v8-qemu-wrapper.patch;patchdir=src/3rdparty \ file://chromium/0002-Remove-the-GN-settings-done-for-clang-that-conflict-.patch;patchdir=src/3rdparty \ + file://chromium/0003-qtwebengine-6.7.0-clang18.patch;patchdir=src/3rdparty \ " SRCREV_FORMAT = "qtwebengine_qtwebengine-chromium" diff --git a/recipes-qt/qt6/qtwebengine/chromium/0003-qtwebengine-6.7.0-clang18.patch b/recipes-qt/qt6/qtwebengine/chromium/0003-qtwebengine-6.7.0-clang18.patch new file mode 100644 index 00000000..cc0274fc --- /dev/null +++ b/recipes-qt/qt6/qtwebengine/chromium/0003-qtwebengine-6.7.0-clang18.patch @@ -0,0 +1,108 @@ +Patch status: fixed in >=chromium-122.0.6200.0 + +https://bugs.gentoo.org/925486 +https://webrtc-review.googlesource.com/c/src/+/332240 +https://webrtc.googlesource.com/src/+/267f9bdd5 +Upstream-Status: Submitted [https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/544766] +Signed-off-by: Khem Raj +From: Tommi +Date: Thu, 21 Dec 2023 14:08:26 +0100 +Subject: [PATCH] Update LegacyStatsCollector to conform with Wc++11-narrowing +--- a/chromium/third_party/webrtc/pc/legacy_stats_collector.cc ++++ b/chromium/third_party/webrtc/pc/legacy_stats_collector.cc +@@ -188,9 +188,10 @@ void ExtractStats(const cricket::VoiceRe + {StatsReport::kStatsValueNameAccelerateRate, info.accelerate_rate}, + {StatsReport::kStatsValueNamePreemptiveExpandRate, + info.preemptive_expand_rate}, +- {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, ++ {StatsReport::kStatsValueNameTotalAudioEnergy, ++ static_cast(info.total_output_energy)}, + {StatsReport::kStatsValueNameTotalSamplesDuration, +- info.total_output_duration}}; ++ static_cast(info.total_output_duration)}}; + + const IntForAdd ints[] = { + {StatsReport::kStatsValueNameCurrentDelayMs, info.delay_estimate_ms}, +@@ -244,9 +245,10 @@ void ExtractStats(const cricket::VoiceSe + SetAudioProcessingStats(report, info.apm_statistics); + + const FloatForAdd floats[] = { +- {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_input_energy}, ++ {StatsReport::kStatsValueNameTotalAudioEnergy, ++ static_cast(info.total_input_energy)}, + {StatsReport::kStatsValueNameTotalSamplesDuration, +- info.total_input_duration}}; ++ static_cast(info.total_input_duration)}}; + + RTC_DCHECK_GE(info.audio_level, 0); + const IntForAdd ints[] = { +@@ -340,7 +342,8 @@ void ExtractStats(const cricket::VideoRe + {StatsReport::kStatsValueNamePlisSent, info.plis_sent}, + {StatsReport::kStatsValueNameRenderDelayMs, info.render_delay_ms}, + {StatsReport::kStatsValueNameTargetDelayMs, info.target_delay_ms}, +- {StatsReport::kStatsValueNameFramesDecoded, info.frames_decoded}, ++ {StatsReport::kStatsValueNameFramesDecoded, ++ static_cast(info.frames_decoded)}, + }; + + for (const auto& i : ints) +@@ -384,15 +387,19 @@ void ExtractStats(const cricket::VideoSe + info.encode_usage_percent}, + {StatsReport::kStatsValueNameFirsReceived, info.firs_received}, + {StatsReport::kStatsValueNameFrameHeightSent, info.send_frame_height}, +- {StatsReport::kStatsValueNameFrameRateInput, round(info.framerate_input)}, ++ {StatsReport::kStatsValueNameFrameRateInput, ++ static_cast(round(info.framerate_input))}, + {StatsReport::kStatsValueNameFrameRateSent, info.framerate_sent}, + {StatsReport::kStatsValueNameFrameWidthSent, info.send_frame_width}, +- {StatsReport::kStatsValueNameNacksReceived, info.nacks_received}, ++ {StatsReport::kStatsValueNameNacksReceived, ++ static_cast(info.nacks_received)}, + {StatsReport::kStatsValueNamePacketsLost, info.packets_lost}, + {StatsReport::kStatsValueNamePacketsSent, info.packets_sent}, + {StatsReport::kStatsValueNamePlisReceived, info.plis_received}, +- {StatsReport::kStatsValueNameFramesEncoded, info.frames_encoded}, +- {StatsReport::kStatsValueNameHugeFramesSent, info.huge_frames_sent}, ++ {StatsReport::kStatsValueNameFramesEncoded, ++ static_cast(info.frames_encoded)}, ++ {StatsReport::kStatsValueNameHugeFramesSent, ++ static_cast(info.huge_frames_sent)}, + }; + + for (const auto& i : ints) +@@ -780,19 +787,25 @@ StatsReport* LegacyStatsCollector::AddCo + AddCandidateReport(remote_candidate_stats, false)->id()); + + const Int64ForAdd int64s[] = { +- {StatsReport::kStatsValueNameBytesReceived, info.recv_total_bytes}, +- {StatsReport::kStatsValueNameBytesSent, info.sent_total_bytes}, +- {StatsReport::kStatsValueNamePacketsSent, info.sent_total_packets}, +- {StatsReport::kStatsValueNameRtt, info.rtt}, ++ {StatsReport::kStatsValueNameBytesReceived, ++ static_cast(info.recv_total_bytes)}, ++ {StatsReport::kStatsValueNameBytesSent, ++ static_cast(info.sent_total_bytes)}, ++ {StatsReport::kStatsValueNamePacketsSent, ++ static_cast(info.sent_total_packets)}, ++ {StatsReport::kStatsValueNameRtt, static_cast(info.rtt)}, + {StatsReport::kStatsValueNameSendPacketsDiscarded, +- info.sent_discarded_packets}, ++ static_cast(info.sent_discarded_packets)}, + {StatsReport::kStatsValueNameSentPingRequestsTotal, +- info.sent_ping_requests_total}, ++ static_cast(info.sent_ping_requests_total)}, + {StatsReport::kStatsValueNameSentPingRequestsBeforeFirstResponse, +- info.sent_ping_requests_before_first_response}, +- {StatsReport::kStatsValueNameSentPingResponses, info.sent_ping_responses}, +- {StatsReport::kStatsValueNameRecvPingRequests, info.recv_ping_requests}, +- {StatsReport::kStatsValueNameRecvPingResponses, info.recv_ping_responses}, ++ static_cast(info.sent_ping_requests_before_first_response)}, ++ {StatsReport::kStatsValueNameSentPingResponses, ++ static_cast(info.sent_ping_responses)}, ++ {StatsReport::kStatsValueNameRecvPingRequests, ++ static_cast(info.recv_ping_requests)}, ++ {StatsReport::kStatsValueNameRecvPingResponses, ++ static_cast(info.recv_ping_responses)}, + }; + for (const auto& i : int64s) + report->AddInt64(i.name, i.value);