Fix missing #includes for gcc-11

Fix bogus volatile caught by gcc-11
This commit is contained in:
Jeff Law 2020-11-12 12:31:30 -07:00
parent 17a759703f
commit ad72b05d84
2 changed files with 150 additions and 2 deletions

139
chromium-gcc11.patch Normal file
View File

@ -0,0 +1,139 @@
diff --git a/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc b/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc
index 19f9aab5b..8073637e9 100644
--- a/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc
+++ b/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc
@@ -35,6 +35,7 @@
#include "absl/synchronization/internal/graphcycles.h"
+#include <limits>
#include <algorithm>
#include <array>
#include "absl/base/internal/hide_ptr.h"
diff --git a/third_party/angle/src/libANGLE/HandleAllocator.cpp b/third_party/angle/src/libANGLE/HandleAllocator.cpp
index 013f1dfb2..3ce63c192 100644
--- a/third_party/angle/src/libANGLE/HandleAllocator.cpp
+++ b/third_party/angle/src/libANGLE/HandleAllocator.cpp
@@ -9,6 +9,7 @@
#include "libANGLE/HandleAllocator.h"
+#include <limits>
#include <algorithm>
#include <functional>
diff --git a/third_party/perfetto/src/trace_processor/containers/string_pool.cc b/third_party/perfetto/src/trace_processor/containers/string_pool.cc
index fd651958f..1e8d0606c 100644
--- a/third_party/perfetto/src/trace_processor/containers/string_pool.cc
+++ b/third_party/perfetto/src/trace_processor/containers/string_pool.cc
@@ -14,9 +14,9 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/containers/string_pool.h"
-#include <limits>
#include "perfetto/base/logging.h"
#include "perfetto/ext/base/utils.h"
diff --git a/third_party/perfetto/src/trace_processor/db/column.cc b/third_party/perfetto/src/trace_processor/db/column.cc
index 00496b335..0dccfeb8a 100644
--- a/third_party/perfetto/src/trace_processor/db/column.cc
+++ b/third_party/perfetto/src/trace_processor/db/column.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/db/column.h"
#include "src/trace_processor/db/compare.h"
diff --git a/third_party/perfetto/src/trace_processor/types/variadic.cc b/third_party/perfetto/src/trace_processor/types/variadic.cc
index 837bfeba9..cdd56817d 100644
--- a/third_party/perfetto/src/trace_processor/types/variadic.cc
+++ b/third_party/perfetto/src/trace_processor/types/variadic.cc
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <limits>
#include "src/trace_processor/types/variadic.h"
namespace perfetto {
diff --git a/ui/accessibility/platform/ax_platform_atk_hyperlink.cc b/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
index be91def6b..73f202356 100644
--- a/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
+++ b/ui/accessibility/platform/ax_platform_atk_hyperlink.cc
@@ -245,7 +245,7 @@ static void AXPlatformAtkHyperlinkInit(AXPlatformAtkHyperlink* self, gpointer) {
}
GType ax_platform_atk_hyperlink_get_type() {
- static volatile gsize type_volatile = 0;
+ static gsize type_volatile = 0;
AXPlatformNodeAuraLinux::EnsureGTypeInit();
diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc
index 04125c6fd..6c64e5d8e 100644
--- a/ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -2274,7 +2274,7 @@ void ClassInit(gpointer class_pointer, gpointer /* class_data */) {
GType GetType() {
AXPlatformNodeAuraLinux::EnsureGTypeInit();
- static volatile gsize type_volatile = 0;
+ static gsize type_volatile = 0;
if (g_once_init_enter(&type_volatile)) {
static const GTypeInfo type_info = {
sizeof(AXPlatformNodeAuraLinuxClass), // class_size
diff --git a/ui/gtk/gtk_key_bindings_handler.cc b/ui/gtk/gtk_key_bindings_handler.cc
index c663a2074..38a342484 100644
--- a/ui/gtk/gtk_key_bindings_handler.cc
+++ b/ui/gtk/gtk_key_bindings_handler.cc
@@ -141,7 +141,7 @@ void GtkKeyBindingsHandler::HandlerClassInit(HandlerClass* klass) {
}
GType GtkKeyBindingsHandler::HandlerGetType() {
- static volatile gsize type_id_volatile = 0;
+ static gsize type_id_volatile = 0;
if (g_once_init_enter(&type_id_volatile)) {
GType type_id = g_type_register_static_simple(
GTK_TYPE_TEXT_VIEW, g_intern_static_string("GtkKeyBindingsHandler"),
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index c0b5a805b..e6f921926 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "base/observer_list.h"
diff --git a/components/bookmarks/browser/bookmark_expanded_state_tracker.cc b/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
index 4ad2afa1f..5c4596e12 100644
--- a/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
+++ b/components/bookmarks/browser/bookmark_expanded_state_tracker.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
#include "components/bookmarks/browser/bookmark_expanded_state_tracker.h"
#include <stdint.h>
diff --git a/components/bookmarks/browser/base_bookmark_model_observer.cc b/components/bookmarks/browser/base_bookmark_model_observer.cc
index 657a3c96b..ad641a082 100644
--- a/components/bookmarks/browser/base_bookmark_model_observer.cc
+++ b/components/bookmarks/browser/base_bookmark_model_observer.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <cstddef>
+
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
namespace bookmarks {

View File

@ -184,8 +184,8 @@ Name: chromium%{chromium_channel}%{nsuffix}
%else
Name: chromium%{chromium_channel}
%endif
Version: %{majorversion}.0.4240.198
Release: 1%{?dist}
Version: %{majorversion}.0.4240.198
Release: 2%{?dist}
%if %{?freeworld}
%if %{?shared}
# chromium-libs-media-freeworld
@ -308,6 +308,9 @@ Patch205: chromium-86.0.4240.75-fix-vaapi-on-intel.patch
# Apply these patches to work around EPEL8 issues
Patch300: chromium-76.0.3809.132-rhel8-force-disable-use_gnome_keyring.patch
# And fixes for new compilers
Patch400: %{name}-gcc11.patch
# Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
# http://build.chromium.org/buildbot/official/
# For Chromium Fedora use chromium-latest.py --stable --ffmpegclean --ffmpegarm
@ -929,6 +932,8 @@ udev.
%patch300 -p1 -b .disblegnomekeyring
%endif
%patch400 -p1 -b .gcc11
# Change shebang in all relevant files in this directory and all subdirectories
# See `man find` for how the `-exec command {} +` syntax works
find -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} +
@ -1926,6 +1931,10 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%changelog
* Thu Nov 12 2020 Jeff Law <law@fedoraproject.org> - 86.0.4240.198-1
- Fix missing #inclues for gcc-11
- Fix bogus volatile caught by gcc-11
* Thu Nov 12 2020 Tom Callaway <spot@fedoraproject.org> - 86.0.4240.198-1
- update to 86.0.4240.198