From 6e7f838169929671fd58ec966361995251b1dd2f Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Wed, 17 Feb 2021 14:15:18 -0500 Subject: [PATCH 1/3] Rawhide (f35) glibc defines SIGSTKSZ as a long instead of a constant --- chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch | 12 ++++++++++++ chromium.spec | 5 +++++ 2 files changed, 17 insertions(+) create mode 100644 chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch diff --git a/chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch b/chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch new file mode 100644 index 00000000..e11b2a0f --- /dev/null +++ b/chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch @@ -0,0 +1,12 @@ +diff -up chromium-88.0.4324.182/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.stdmaxfix chromium-88.0.4324.182/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc +--- chromium-88.0.4324.182/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.stdmaxfix 2021-02-17 13:16:27.120283969 -0500 ++++ chromium-88.0.4324.182/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc 2021-02-17 13:17:37.951617295 -0500 +@@ -135,7 +135,7 @@ static bool SetupAlternateStackOnce() { + #else + const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; + #endif +- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; ++ size_t stack_size = (std::max(SIGSTKSZ, static_cast(65536)) + page_mask) & ~page_mask; + #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ + defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) + // Account for sanitizer instrumentation requiring additional stack space. diff --git a/chromium.spec b/chromium.spec index 4c51251c..10430102 100644 --- a/chromium.spec +++ b/chromium.spec @@ -313,6 +313,8 @@ Patch74: chromium-88-StringPool-include.patch # Fix sandbox code to properly handle the new way that glibc handles fstat in Fedora 34+ # Thanks to Kevin Kofler for the fix. Patch75: chromium-88.0.4324.96-fstatfix.patch +# Rawhide (f35) glibc defines SIGSTKSZ as a long instead of a constant +Patch76: chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch # Use lstdc++ on EPEL7 only Patch101: chromium-75.0.3770.100-epel7-stdc++.patch @@ -938,6 +940,9 @@ udev. %patch73 -p1 -b .ityp-include %patch74 -p1 -b .StringPool-include %patch75 -p1 -b .fstatfix +%if 0%{?fedora} >= 35 +%patch76 -p1 -b .sigstkszfix +%endif # Fedora branded user agent %if 0%{?fedora} From 02f86040df0446c74b88efa807cc5be2046333ab Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Wed, 17 Feb 2021 14:41:05 -0500 Subject: [PATCH 2/3] fix last patch --- chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch b/chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch index e11b2a0f..d63c00ad 100644 --- a/chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch +++ b/chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch @@ -10,3 +10,15 @@ diff -up chromium-88.0.4324.182/third_party/abseil-cpp/absl/debugging/failure_si #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) // Account for sanitizer instrumentation requiring additional stack space. +diff -up chromium-88.0.4324.182/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.stdmaxfix chromium-88.0.4324.182/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +--- chromium-88.0.4324.182/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc.stdmaxfix 2021-02-17 14:39:04.556382532 -0500 ++++ chromium-88.0.4324.182/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2021-02-17 14:39:34.002519173 -0500 +@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. +- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); ++ static const unsigned kSigStackSize = std::max(static_cast(16384), SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. From 6a13047b90a5435e9f8691e1b634bb552126a1b8 Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Thu, 25 Feb 2021 14:58:16 -0500 Subject: [PATCH 3/3] fix swiftshader symbols in libEGL/libGLESv2 with gcc --- ...cc-fix-swiftshader-libEGL-visibility.patch | 26 +++++++++++++++++++ chromium.spec | 8 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch diff --git a/chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch b/chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch new file mode 100644 index 00000000..d1bbe88a --- /dev/null +++ b/chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch @@ -0,0 +1,26 @@ +diff -up chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn.gcc-swiftshader-visibility chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn +--- chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn.gcc-swiftshader-visibility 2021-02-25 16:31:51.929335783 +0000 ++++ chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libEGL/BUILD.gn 2021-02-25 16:31:51.929335783 +0000 +@@ -42,7 +42,8 @@ config("swiftshader_libEGL_private_confi + } else if (is_clang) { + defines += [ "EGLAPI=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ] + } else { +- defines += [ "EGLAPI= " ] ++ cflags += [ "-fvisibility=protected" ] ++ defines += [ "EGLAPI=__attribute__((visibility(\"protected\")))" ] + } + } + } +diff -up chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn.gcc-swiftshader-visibility chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn +--- chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn.gcc-swiftshader-visibility 2021-02-25 18:16:28.576901417 +0000 ++++ chromium-88.0.4324.182/third_party/swiftshader/src/OpenGL/libGLESv2/BUILD.gn 2021-02-25 18:17:50.356567690 +0000 +@@ -57,7 +57,8 @@ config("swiftshader_libGLESv2_private_co + } else if (is_clang) { + defines += [ "GL_APICALL=__attribute__((visibility(\"protected\"))) __attribute__((no_sanitize(\"function\")))" ] + } else { +- defines += [ "GL_APICALL= " ] ++ cflags += [ "-fvisibility=protected" ] ++ defines += [ "GL_APICALL=__attribute__((visibility(\"protected\")))" ] + } + } + } diff --git a/chromium.spec b/chromium.spec index 4c51251c..72ecafb8 100644 --- a/chromium.spec +++ b/chromium.spec @@ -216,7 +216,7 @@ Name: chromium%{chromium_channel}%{nsuffix} Name: chromium%{chromium_channel} %endif Version: %{majorversion}.0.4324.182 -Release: 1%{?dist} +Release: 2%{?dist} %if %{?freeworld} %if %{?shared} # chromium-libs-media-freeworld @@ -313,6 +313,8 @@ Patch74: chromium-88-StringPool-include.patch # Fix sandbox code to properly handle the new way that glibc handles fstat in Fedora 34+ # Thanks to Kevin Kofler for the fix. Patch75: chromium-88.0.4324.96-fstatfix.patch +# Fix symbol visibility with gcc on swiftshader's libEGL +Patch76: chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch # Use lstdc++ on EPEL7 only Patch101: chromium-75.0.3770.100-epel7-stdc++.patch @@ -938,6 +940,7 @@ udev. %patch73 -p1 -b .ityp-include %patch74 -p1 -b .StringPool-include %patch75 -p1 -b .fstatfix +%patch76 -p1 -b .gcc-swiftshader-visibility # Fedora branded user agent %if 0%{?fedora} @@ -1984,6 +1987,9 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %changelog +* Thu Feb 25 2021 Tom Callaway - 88.0.4234.182-2 +- fix swiftshader symbols in libEGL/libGLESv2 with gcc + * Wed Feb 17 2021 Tom Callaway - 88.0.4234.182-1 - update to 88.0.4234.182