From fc32d598adec7790aa68253f21a1dd50fa236f40 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Sat, 27 Feb 2021 15:20:27 +0300 Subject: [PATCH] Fix building with current glib2.0 Patch was found by Alzim@ --- chromium-browser-stable.spec | 4 +++ glib2.0.patch | 53 ++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 glib2.0.patch diff --git a/chromium-browser-stable.spec b/chromium-browser-stable.spec index 726a521..b62c68a 100644 --- a/chromium-browser-stable.spec +++ b/chromium-browser-stable.spec @@ -151,6 +151,9 @@ Patch639: wayland-strndup.patch Patch640: chromium-88.0.4324.96-fstatfix.patch # https://build.opensuse.org/package/view_file/openSUSE:Factory/chromium/build-with-pipewire-0.3.patch Patch642: build-with-pipewire-0.3.patch +# Fix building with current glib2.0 +# Hunks from https://build.opensuse.org/package/view_file/openSUSE:Factory/chromium/chromium-gcc11.patch +Patch643: glib2.0.patch BuildRequires: bison %if %{with clang} @@ -389,6 +392,7 @@ cp -f %{_gostsourcedir}/src/msspi/third_party/cprocsp/include/* third_party/bori %patch639 -p1 %patch640 -p1 %patch642 -p1 +%patch643 -p1 # fatal error: 'fuzzer/FuzzedDataProvider.h' file not found # (Available in Clang10) diff --git a/glib2.0.patch b/glib2.0.patch new file mode 100644 index 0000000..8fe8491 --- /dev/null +++ b/glib2.0.patch @@ -0,0 +1,53 @@ +Fix building with current glib2.0 + +DEBUG: FAILED: obj/ui/accessibility/platform/platform/ax_platform_atk_hyperlink.o +DEBUG: ../../ui/accessibility/platform/ax_platform_atk_hyperlink.cc:252:7: error: cannot initialize a parameter of type 'unsigned long *' with an rvalue of type 'typename std::remove_reference::type *' (aka 'volatile unsigned long *') +DEBUG: if (g_once_init_enter(&type_volatile)) { +DEBUG: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DEBUG: /usr/include/glib-2.0/glib/gthread.h:260:7: note: expanded from macro 'g_once_init_enter' +DEBUG: (!g_atomic_pointer_get (location) && \ +DEBUG: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DEBUG: /usr/include/glib-2.0/glib/gatomic.h:112:38: note: expanded from macro 'g_atomic_pointer_get' +DEBUG: __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \ +DEBUG: ^~~~~~~~~~~~~~~~~ +DEBUG: 1 error generated. + +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"),