From 31b6acbbda8614bb9d5b974d5b5b15331ce0d3ab Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Mon, 27 Jul 2020 20:53:22 +0800 Subject: chromium: Fix GCC 9 build --- chromium/chromium/chromium-gcc9-r772175.patch | 76 +++++++++++++++++++++++++++ chromium/chromium/chromium-gcc9-r772348.patch | 61 +++++++++++++++++++++ chromium/chromium/chromium.spec | 7 ++- 3 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 chromium/chromium/chromium-gcc9-r772175.patch create mode 100644 chromium/chromium/chromium-gcc9-r772348.patch diff --git a/chromium/chromium/chromium-gcc9-r772175.patch b/chromium/chromium/chromium-gcc9-r772175.patch new file mode 100644 index 0000000..3ebbb98 --- /dev/null +++ b/chromium/chromium/chromium-gcc9-r772175.patch @@ -0,0 +1,76 @@ +From 911bdcd8cc5475be4ec4228cfbc85fc38f52857e Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Wed, 27 May 2020 10:00:41 +0000 +Subject: [PATCH] GCC: make base::{flat_map,flat_tree} move assignement + operators noexcept +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Move assigment operator in ui::ColorSet is noexcept. Because this +class has a member of type base::flat_map, move assignment operators +of base::flat_map and base::flat_tree must be noexcept too. +base::flat_tree noexcept is conditional to avoid build failure with +NaCl. + +Otherwise GCC fails like this: + +../../ui/color/color_set.cc:14:11: error: function +'ui::ColorSet& ui::ColorSet::operator=(ui::ColorSet&&)' defaulted on its +redeclaration with an exception-specification that differs from the +implicit exception-specification '' + 14 | ColorSet& ColorSet::operator=(ColorSet&&) noexcept = default; + | ^~~~~~~~ + +Bug: 819294 +Change-Id: I10ce31851effc9ce78f2b5cbbb7148c339f065a7 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2179245 +Commit-Queue: Jan Wilken Dörrie +Reviewed-by: Daniel Cheng +Cr-Commit-Position: refs/heads/master@{#772175} +--- + base/containers/flat_map.h | 2 +- + base/containers/flat_tree.h | 7 +++++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/base/containers/flat_map.h b/base/containers/flat_map.h +index ed82c5d516c8..1af6b407a52d 100644 +--- a/base/containers/flat_map.h ++++ b/base/containers/flat_map.h +@@ -202,7 +202,7 @@ class flat_map : public ::base::internal::flat_tree< + ~flat_map() = default; + + flat_map& operator=(const flat_map&) = default; +- flat_map& operator=(flat_map&&) = default; ++ flat_map& operator=(flat_map&&) noexcept = default; + // Takes the first if there are duplicates in the initializer list. + flat_map& operator=(std::initializer_list ilist); + +diff --git a/base/containers/flat_tree.h b/base/containers/flat_tree.h +index 9412ff6af749..ce6e92b4d363 100644 +--- a/base/containers/flat_tree.h ++++ b/base/containers/flat_tree.h +@@ -125,7 +125,8 @@ class flat_tree { + // Assume that move assignment invalidates iterators and references. + + flat_tree& operator=(const flat_tree&); +- flat_tree& operator=(flat_tree&&); ++ flat_tree& operator=(flat_tree&&) noexcept( ++ std::is_nothrow_move_assignable::value); + // Takes the first if there are duplicates in the initializer list. + flat_tree& operator=(std::initializer_list ilist); + +@@ -518,7 +519,9 @@ auto flat_tree::operator=( + const flat_tree&) -> flat_tree& = default; + + template +-auto flat_tree::operator=(flat_tree &&) ++auto flat_tree:: ++operator=(flat_tree&&) noexcept( ++ std::is_nothrow_move_assignable::value) + -> flat_tree& = default; + + template +-- +2.26.2 + diff --git a/chromium/chromium/chromium-gcc9-r772348.patch b/chromium/chromium/chromium-gcc9-r772348.patch new file mode 100644 index 0000000..06f9b42 --- /dev/null +++ b/chromium/chromium/chromium-gcc9-r772348.patch @@ -0,0 +1,61 @@ +From c65b4d03c76da607b6b678c4a46baa75ca0cf7b3 Mon Sep 17 00:00:00 2001 +From: Stephan Hartmann +Date: Wed, 27 May 2020 18:46:40 +0000 +Subject: [PATCH] GCC: make base::FilePath move assignment operator noexcept + +The move assignment operator in PaintPreviewClient::PaintPreviewData is +noexcept. Because this class has a member of type base::FilePath, the +move assignment operator of base::FilePath must be noexcept too. + +Otherwise GCC fails like this: + +../../components/paint_preview/browser/paint_preview_client.cc:107:1: + +error: function 'paint_preview::PaintPreviewClient::PaintPreviewData& +paint_preview::PaintPreviewClient::PaintPreviewData::operator= +(paint_preview::PaintPreviewClient::PaintPreviewData&&)' defaulted on +its redeclaration with an exception-specification that differs from +the implicit exception-specification '' + 107 | PaintPreviewClient::PaintPreviewData::operator=( + | ^~~~~~~~~~~~~~~~~~ + +Bug: 819294 +Change-Id: I87b88a81e8af6b7e61f0d1a8c8444fd6707e50d2 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2218168 +Commit-Queue: Lei Zhang +Reviewed-by: Lei Zhang +Cr-Commit-Position: refs/heads/master@{#772348} +--- + base/files/file_path.cc | 2 +- + base/files/file_path.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/base/files/file_path.cc b/base/files/file_path.cc +index 6dc68540e9af..56c02d2bfc7c 100644 +--- a/base/files/file_path.cc ++++ b/base/files/file_path.cc +@@ -186,7 +186,7 @@ FilePath::~FilePath() = default; + + FilePath& FilePath::operator=(const FilePath& that) = default; + +-FilePath& FilePath::operator=(FilePath&& that) = default; ++FilePath& FilePath::operator=(FilePath&& that) noexcept = default; + + bool FilePath::operator==(const FilePath& that) const { + #if defined(FILE_PATH_USES_DRIVE_LETTERS) +diff --git a/base/files/file_path.h b/base/files/file_path.h +index 4e23f71a92aa..2160fdaca31d 100644 +--- a/base/files/file_path.h ++++ b/base/files/file_path.h +@@ -193,7 +193,7 @@ class BASE_EXPORT FilePath { + FilePath(FilePath&& that) noexcept; + // Replaces the contents with those of |that|, which is left in valid but + // unspecified state. +- FilePath& operator=(FilePath&& that); ++ FilePath& operator=(FilePath&& that) noexcept; + + bool operator==(const FilePath& that) const; + +-- +2.26.2 + diff --git a/chromium/chromium/chromium.spec b/chromium/chromium/chromium.spec index 57feddf..171837a 100644 --- a/chromium/chromium/chromium.spec +++ b/chromium/chromium/chromium.spec @@ -52,7 +52,7 @@ Name: chromium Version: 84.0.4147.89 -Release: 100%{?dist} +Release: 101%{?dist} Summary: A WebKit (Blink) powered web browser License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) @@ -135,6 +135,8 @@ Patch58: chromium-gcc10-r773855.patch Patch59: chromium-gcc10-r774141.patch Patch60: chromium-gcc10-r775439.patch Patch61: chromium-gcc10-r778406.patch +Patch62: chromium-gcc9-r772175.patch +Patch63: chromium-gcc9-r772348.patch # I don't have time to test whether it work on other architectures ExclusiveArch: x86_64 @@ -713,6 +715,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Jul 26 2020 - Ting-Wei Lan - 84.0.4147.89-101 +- Fix build issues for GCC 9 + * Sun Jul 26 2020 - Ting-Wei Lan - 84.0.4147.89-100 - Update to 84.0.4147.89 -- cgit