From 2bf7a249945f6c2f4701dbcf729f316b37076735 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Fri, 15 Sep 2023 14:45:10 +0200 Subject: [PATCH] fixed several compiler errors due to old clang version --- ...ium-117-emplace_back_on_vector-c++20.patch | 14 +++++ ...chromium-117-no_matching_constructor.patch | 54 +++++++++++++++++++ ...karound_clang_bug-structured_binding.patch | 27 ++++++++++ chromium.spec | 7 +-- 4 files changed, 99 insertions(+), 3 deletions(-) rename chromium-116-no_matching_constructor.patch => chromium-117-no_matching_constructor.patch (86%) diff --git a/chromium-117-emplace_back_on_vector-c++20.patch b/chromium-117-emplace_back_on_vector-c++20.patch index 3a3c1320..acac8781 100644 --- a/chromium-117-emplace_back_on_vector-c++20.patch +++ b/chromium-117-emplace_back_on_vector-c++20.patch @@ -58,3 +58,17 @@ diff -up chromium-117.0.5938.62/base/trace_event/trace_log.cc.me chromium-117.0. } void TraceLog::OnStart(const perfetto::DataSourceBase::StartArgs&) { +diff -up chromium-117.0.5938.62/content/browser/download/save_package.cc.me chromium-117.0.5938.62/content/browser/download/save_package.cc +--- chromium-117.0.5938.62/content/browser/download/save_package.cc.me 2023-09-15 12:02:43.866622591 +0200 ++++ chromium-117.0.5938.62/content/browser/download/save_package.cc 2023-09-15 12:03:58.715984511 +0200 +@@ -764,8 +764,8 @@ void SavePackage::Finish() { + if (download_) { + std::vector files; + for (auto& item : saved_success_items_) { +- files.emplace_back(item.second->full_path(), item.second->url(), +- item.second->referrer().url); ++ files.emplace_back() = {item.second->full_path(), item.second->url(), ++ item.second->referrer().url}; + } + download::DownloadSaveItemData::AttachItemData(download_, std::move(files)); + } diff --git a/chromium-116-no_matching_constructor.patch b/chromium-117-no_matching_constructor.patch similarity index 86% rename from chromium-116-no_matching_constructor.patch rename to chromium-117-no_matching_constructor.patch index 4c238fb2..76e70a3f 100644 --- a/chromium-116-no_matching_constructor.patch +++ b/chromium-117-no_matching_constructor.patch @@ -362,3 +362,57 @@ diff -up chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client. if (browser_) { auto navigation = chrome::OpenCurrentURL(browser_); +diff -up chromium-117.0.5938.62/net/dns/host_resolver_cache.cc.me chromium-117.0.5938.62/net/dns/host_resolver_cache.cc +diff -up chromium-117.0.5938.62/third_party/blink/renderer/platform/fonts/font_palette.h.me chromium-117.0.5938.62/third_party/blink/renderer/platform/fonts/font_palette.h +--- chromium-117.0.5938.62/third_party/blink/renderer/platform/fonts/font_palette.h.me 2023-09-15 10:48:41.330294241 +0200 ++++ chromium-117.0.5938.62/third_party/blink/renderer/platform/fonts/font_palette.h 2023-09-15 10:51:24.501324416 +0200 +@@ -96,7 +96,7 @@ class PLATFORM_EXPORT FontPalette : publ + Color::ColorSpace color_interpolation_space, + absl::optional hue_interpolation_method) { + return base::AdoptRef(new FontPalette( +- start, end, NonNormalizedPercentages(start_percentage, end_percentage), ++ start, end, NonNormalizedPercentages{start_percentage, end_percentage}, + normalized_percentage, alpha_multiplier, color_interpolation_space, + hue_interpolation_method)); + } +@@ -170,7 +170,7 @@ class PLATFORM_EXPORT FontPalette : publ + double normalized_percentage) { + double end_percentage = normalized_percentage * 100.0; + double start_percentage = 100.0 - end_percentage; +- return NonNormalizedPercentages(start_percentage, end_percentage); ++ return NonNormalizedPercentages{start_percentage, end_percentage}; + } + + double GetAlphaMultiplier() const { +diff -up chromium-117.0.5938.62/content/browser/renderer_host/render_frame_host_impl.cc.me chromium-117.0.5938.62/content/browser/renderer_host/render_frame_host_impl.cc +--- chromium-117.0.5938.62/content/browser/renderer_host/render_frame_host_impl.cc.me 2023-09-15 12:17:35.664861257 +0200 ++++ chromium-117.0.5938.62/content/browser/renderer_host/render_frame_host_impl.cc 2023-09-15 12:21:06.112694256 +0200 +@@ -8509,7 +8509,7 @@ void RenderFrameHostImpl::SendFencedFram + for (const blink::FencedFrame::ReportingDestination& destination : + destinations) { + SendFencedFrameReportingBeaconInternal( +- DestinationEnumEvent(event_type, event_data), destination, ++ DestinationEnumEvent{event_type, event_data}, destination, + /*from_renderer=*/true, attribution_reporting_runtime_features, + GetFrameTreeNodeId()); + } +@@ -8545,7 +8545,7 @@ void RenderFrameHostImpl::SendFencedFram + } + + SendFencedFrameReportingBeaconInternal( +- DestinationURLEvent(destination_url), ++ DestinationURLEvent{destination_url}, + blink::FencedFrame::ReportingDestination::kBuyer, + /*from_renderer=*/true, attribution_reporting_runtime_features, + GetFrameTreeNodeId()); +@@ -8617,8 +8617,8 @@ void RenderFrameHostImpl::MaybeSendFence + for (blink::FencedFrame::ReportingDestination destination : + info->destinations) { + initiator_rfh->SendFencedFrameReportingBeaconInternal( +- DestinationEnumEvent(blink::kFencedFrameTopNavigationBeaconType, +- info->data), ++ DestinationEnumEvent{blink::kFencedFrameTopNavigationBeaconType, ++ info->data}, + destination, + /*from_renderer=*/false, info->attribution_reporting_runtime_features, + GetFrameTreeNodeId(), navigation_request.GetNavigationId()); diff --git a/chromium-117-workaround_clang_bug-structured_binding.patch b/chromium-117-workaround_clang_bug-structured_binding.patch index ddde8680..3b79f512 100644 --- a/chromium-117-workaround_clang_bug-structured_binding.patch +++ b/chromium-117-workaround_clang_bug-structured_binding.patch @@ -67,3 +67,30 @@ diff -up chromium-115.0.5790.32/content/browser/service_worker/service_worker_co DCHECK(document_url.is_valid()); TRACE_EVENT1("ServiceWorker", +diff -up chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc +--- chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.me 2023-09-15 13:03:00.787257048 +0200 ++++ chromium-117.0.5938.62/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-09-15 13:15:05.502706522 +0200 +@@ -3437,7 +3437,10 @@ void NGGridLayoutAlgorithm::PlaceGridIte + DCHECK(out_row_break_between); + + const auto& container_space = ConstraintSpace(); +- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData(); ++ const auto& [g_i, l_d, t_s] = sizing_tree.TreeRootData(); ++ const auto& grid_items = g_i; ++ const auto& layout_data = l_d; ++ const auto& tree_size = t_s; + + const auto* cached_layout_subtree = container_space.GridLayoutSubtree(); + const auto container_writing_direction = +@@ -3601,7 +3604,10 @@ void NGGridLayoutAlgorithm::PlaceGridIte + + // TODO(ikilpatrick): Update |SetHasSeenAllChildren| and early exit if true. + const auto& constraint_space = ConstraintSpace(); +- const auto& [grid_items, layout_data, tree_size] = sizing_tree.TreeRootData(); ++ const auto& [g_i, l_d, t_s] = sizing_tree.TreeRootData(); ++ const auto& grid_items = g_i; ++ const auto& layout_data = l_d; ++ const auto& tree_size =t_s; + + const auto* cached_layout_subtree = constraint_space.GridLayoutSubtree(); + const auto container_writing_direction = diff --git a/chromium.spec b/chromium.spec index 0ae9f25d..3197d6cf 100644 --- a/chromium.spec +++ b/chromium.spec @@ -337,8 +337,9 @@ Patch117: chromium-108-ffmpeg-revert-new-channel-layout-api.patch # revert AV1 VAAPI video encode due to old libva on el9 Patch130: chromium-114-revert-av1enc-el9.patch -# compiler build errors -Patch300: chromium-116-no_matching_constructor.patch +# fixes for old clang version in fedora < 38 end epel +# compiler build errors, no matching constructor for initialization +Patch300: chromium-117-no_matching_constructor.patch Patch301: chromium-115-compiler-SkColor4f.patch # workaround for clang bug, https://github.com/llvm/llvm-project/issues/57826 @@ -358,7 +359,7 @@ Patch306: chromium-117-emplace_back_on_vector-c++20.patch # error: fatal error: 'sys/ifunc.h' file not found Patch307: chromium-116-arm64-memory_tagging.patch -# compiler error, invalid operands to binary expression +# error: invalid operands to binary expression Patch308: chromium-117-string-convert.patch # clang warnings