From 13afbe10ca0524660d55127fe5596a66b9d8b5d5 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sat, 18 Jul 2020 09:41:17 -0400 Subject: [PATCH] try fix for constexpr issue with epel gcc --- chromium-84.0.4147.89-el-constexpr.patch | 12 ++++++++++++ chromium.spec | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100644 chromium-84.0.4147.89-el-constexpr.patch diff --git a/chromium-84.0.4147.89-el-constexpr.patch b/chromium-84.0.4147.89-el-constexpr.patch new file mode 100644 index 00000000..78723429 --- /dev/null +++ b/chromium-84.0.4147.89-el-constexpr.patch @@ -0,0 +1,12 @@ +diff -up chromium-84.0.4147.89/base/check_op.h.el-constexpr chromium-84.0.4147.89/base/check_op.h +--- chromium-84.0.4147.89/base/check_op.h.el-constexpr 2020-07-18 09:38:18.700433097 -0400 ++++ chromium-84.0.4147.89/base/check_op.h 2020-07-18 09:38:26.698306359 -0400 +@@ -124,7 +124,7 @@ class CheckOpResult { + // A non-success result. expr_str is something like "foo != bar". v1_str and + // v2_str are the stringified run-time values of foo and bar. Takes ownership + // of v1_str and v2_str. +- BASE_EXPORT CheckOpResult(const char* expr_str, char* v1_str, char* v2_str); ++ BASE_EXPORT constexpr CheckOpResult(const char* expr_str, char* v1_str, char* v2_str); + + // Returns true if the check succeeded. + constexpr explicit operator bool() const { return !message_; } diff --git a/chromium.spec b/chromium.spec index 30af4420..e1a19fd5 100644 --- a/chromium.spec +++ b/chromium.spec @@ -295,6 +295,10 @@ Patch103: chromium-84.0.4147.89-epel7-no-kcmp-h.patch # Use old cups (chromium's code workaround breaks on gcc) # Revert: https://github.com/chromium/chromium/commit/c3213f8779ddc427e89d982514185ed5e4c94e91 Patch104: chromium-84.0.4147.89-epel7-old-cups.patch +# Old GCC throws: +# ../../base/check_op.h: In function 'constexpr logging::CheckOpResult logging::CheckGTImpl(int, int, const char*)': +# ../../base/check_op.h:180:3: error: call to non-'constexpr' function 'logging::CheckOpResult::CheckOpResult(const char*, char*, char*)' +Patch105: chromium-84.0.4147.89-el-constexpr.patch # Enable VAAPI support on Linux # NOTE: This patch will never land upstream @@ -896,6 +900,10 @@ udev. %patch104 -p1 -b .el7cups %endif +%if 0%{?rhel} == 7 || 0%{?rhel} == 8 +%patch105 -p1 -b .el-constexpr +%endif + # Feature specific patches %if %{use_vaapi} %patch202 -p1 -b .vaapi