diff --git a/chromium-112-workaround-llvm14-c++20-epel8.patch b/chromium-112-workaround-llvm14-c++20-epel8.patch new file mode 100644 index 00000000..d357538d --- /dev/null +++ b/chromium-112-workaround-llvm14-c++20-epel8.patch @@ -0,0 +1,312 @@ +diff -up chromium-112.0.5615.49/base/clang_work_around.h.me chromium-112.0.5615.49/base/clang_work_around.h +--- chromium-112.0.5615.49/base/clang_work_around.h.me 2023-04-10 12:10:42.229455956 +0200 ++++ chromium-112.0.5615.49/base/clang_work_around.h 2023-04-10 12:16:41.191744766 +0200 +@@ -0,0 +1,10 @@ ++// ++// workaound for clang-14 in c++20 mode ++// ++ ++#ifndef WORKAROUND_CLANG14_IN_C_PLUS_PLUS_20_H ++#define WORKAROUND_CLANG14_IN_C_PLUS_PLUS_20_H ++ ++static std::u16string clang_string_workaround(const char16_t* a, const char16_t* b) { return {a, b}; } ++ ++#endif // WORKAROUND_CLANG14_IN_C_PLUS_PLUS_20_H +diff -up chromium-112.0.5615.49/base/i18n/number_formatting.cc.me chromium-112.0.5615.49/base/i18n/number_formatting.cc +--- chromium-112.0.5615.49/base/i18n/number_formatting.cc.me 2023-04-10 11:26:58.126271434 +0200 ++++ chromium-112.0.5615.49/base/i18n/number_formatting.cc 2023-04-10 12:13:17.573209444 +0200 +@@ -18,6 +18,7 @@ + #include "base/strings/utf_string_conversions.h" + #include "third_party/icu/source/common/unicode/ustring.h" + #include "third_party/icu/source/i18n/unicode/numfmt.h" ++#include "base/clang_work_around.h" + + namespace base { + +diff -up chromium-112.0.5615.49/base/i18n/time_formatting.cc.me chromium-112.0.5615.49/base/i18n/time_formatting.cc +--- chromium-112.0.5615.49/base/i18n/time_formatting.cc.me 2023-04-10 10:21:25.360079525 +0200 ++++ chromium-112.0.5615.49/base/i18n/time_formatting.cc 2023-04-10 12:13:36.373485371 +0200 +@@ -22,6 +22,7 @@ + #include "third_party/icu/source/i18n/unicode/fmtable.h" + #include "third_party/icu/source/i18n/unicode/measfmt.h" + #include "third_party/icu/source/i18n/unicode/smpdtfmt.h" ++#include "base/clang_work_around.h" + + namespace base { + namespace { +diff -up chromium-112.0.5615.49/base/strings/string_piece.cc.me chromium-112.0.5615.49/base/strings/string_piece.cc +--- chromium-112.0.5615.49/base/strings/string_piece.cc.me 2023-04-10 10:20:40.230277808 +0200 ++++ chromium-112.0.5615.49/base/strings/string_piece.cc 2023-04-10 12:14:00.262863956 +0200 +@@ -12,6 +12,7 @@ + + #include "base/strings/utf_string_conversions.h" + #include "build/build_config.h" ++#include "base/clang_work_around.h" + + namespace base { + namespace { +diff -up chromium-112.0.5615.49/components/url_formatter/spoof_checks/skeleton_generator.cc.me chromium-112.0.5615.49/components/url_formatter/spoof_checks/skeleton_generator.cc +--- chromium-112.0.5615.49/components/url_formatter/spoof_checks/skeleton_generator.cc.me 2023-04-10 11:27:36.207948830 +0200 ++++ chromium-112.0.5615.49/components/url_formatter/spoof_checks/skeleton_generator.cc 2023-04-10 12:17:36.338730147 +0200 +@@ -15,6 +15,7 @@ + #include "third_party/icu/source/i18n/unicode/regex.h" + #include "third_party/icu/source/i18n/unicode/translit.h" + #include "third_party/icu/source/i18n/unicode/uspoof.h" ++#include "base/clang_work_around.h" + + namespace { + +diff -up chromium-112.0.5615.49/content/child/browser_font_resource_trusted.cc.me chromium-112.0.5615.49/content/child/browser_font_resource_trusted.cc +--- chromium-112.0.5615.49/content/child/browser_font_resource_trusted.cc.me 2023-04-10 11:28:09.962549271 +0200 ++++ chromium-112.0.5615.49/content/child/browser_font_resource_trusted.cc 2023-04-10 12:12:14.242145968 +0200 +@@ -26,6 +26,7 @@ + #include "third_party/skia/include/core/SkRect.h" + #include "ui/gfx/geometry/rect_f.h" + #include "ui/gfx/ubidi_deleter.h" ++#include "base/clang_work_around.h" + + using ppapi::StringVar; + using ppapi::thunk::EnterResourceNoLock; +diff -up chromium-112.0.5615.49/content/common/zygote/zygote_communication_linux.cc.me chromium-112.0.5615.49/content/common/zygote/zygote_communication_linux.cc +--- chromium-112.0.5615.49/content/common/zygote/zygote_communication_linux.cc.me 2023-04-10 10:19:32.223069670 +0200 ++++ chromium-112.0.5615.49/content/common/zygote/zygote_communication_linux.cc 2023-04-10 12:12:31.315438868 +0200 +@@ -22,6 +22,7 @@ + #include "content/public/common/result_codes.h" + #include "sandbox/policy/switches.h" + #include "third_party/icu/source/i18n/unicode/timezone.h" ++#include "base/clang_work_around.h" + + namespace content { + +diff -up chromium-112.0.5615.49/mojo/public/cpp/base/string16_mojom_traits.cc.me chromium-112.0.5615.49/mojo/public/cpp/base/string16_mojom_traits.cc +--- chromium-112.0.5615.49/mojo/public/cpp/base/string16_mojom_traits.cc.me 2023-04-10 11:26:20.277598168 +0200 ++++ chromium-112.0.5615.49/mojo/public/cpp/base/string16_mojom_traits.cc 2023-04-10 12:12:56.706874472 +0200 +@@ -6,6 +6,8 @@ + + #include "mojo/public/cpp/base/big_buffer_mojom_traits.h" + ++#include "base/clang_work_around.h" ++ + namespace mojo { + + // static +diff -up chromium-112.0.5615.49/third_party/blink/common/page_state/page_state_serialization.cc.me chromium-112.0.5615.49/third_party/blink/common/page_state/page_state_serialization.cc +--- chromium-112.0.5615.49/third_party/blink/common/page_state/page_state_serialization.cc.me 2023-04-10 11:22:27.525457904 +0200 ++++ chromium-112.0.5615.49/third_party/blink/common/page_state/page_state_serialization.cc 2023-04-10 12:14:21.584248718 +0200 +@@ -24,6 +24,7 @@ + #include "ui/display/screen.h" + #include "ui/gfx/geometry/mojom/geometry_mojom_traits.h" + #include "url/mojom/url_gurl_mojom_traits.h" ++#include "base/clang_work_around.h" + + namespace blink { + +diff -up chromium-112.0.5615.49/base/strings/escape.cc.me chromium-112.0.5615.49/base/strings/escape.cc +--- chromium-112.0.5615.49/base/strings/escape.cc.me 2023-04-10 16:10:08.298906995 +0200 ++++ chromium-112.0.5615.49/base/strings/escape.cc 2023-04-10 16:10:17.751072552 +0200 +@@ -14,6 +14,7 @@ + #include "base/strings/utf_string_conversion_utils.h" + #include "base/strings/utf_string_conversions.h" + #include "base/third_party/icu/icu_utf.h" ++#include "base/clang_work_around.h" + + namespace base { + +diff -up chromium-112.0.5615.49/base/strings/string_split.cc.me chromium-112.0.5615.49/base/strings/string_split.cc +--- chromium-112.0.5615.49/base/strings/string_split.cc.me 2023-04-10 16:17:49.702245206 +0200 ++++ chromium-112.0.5615.49/base/strings/string_split.cc 2023-04-10 16:17:56.420471079 +0200 +@@ -10,6 +10,7 @@ + #include "base/strings/string_split_internal.h" + #include "base/strings/string_util.h" + #include "base/third_party/icu/icu_utf.h" ++#include "base/clang_work_around.h" + + namespace base { + +diff -up chromium-112.0.5615.49/chrome/browser/sharing/click_to_call/click_to_call_utils.cc.me chromium-112.0.5615.49/chrome/browser/sharing/click_to_call/click_to_call_utils.cc +--- chromium-112.0.5615.49/chrome/browser/sharing/click_to_call/click_to_call_utils.cc.me 2023-04-10 16:09:21.861093623 +0200 ++++ chromium-112.0.5615.49/chrome/browser/sharing/click_to_call/click_to_call_utils.cc 2023-04-10 16:09:31.428261186 +0200 +@@ -21,6 +21,7 @@ + #include "third_party/re2/src/re2/re2.h" + #include "url/url_constants.h" + #include "url/url_util.h" ++#include "base/clang_work_around.h" + + namespace { + +diff -up chromium-112.0.5615.49/ui/ozone/platform/wayland/host/wayland_exchange_data_provider.cc.me chromium-112.0.5615.49/ui/ozone/platform/wayland/host/wayland_exchange_data_provider.cc +--- chromium-112.0.5615.49/ui/ozone/platform/wayland/host/wayland_exchange_data_provider.cc.me 2023-04-10 16:05:55.155357863 +0200 ++++ chromium-112.0.5615.49/ui/ozone/platform/wayland/host/wayland_exchange_data_provider.cc 2023-04-10 16:06:09.726629617 +0200 +@@ -27,6 +27,7 @@ + #include "url/gurl.h" + #include "url/url_canon.h" + #include "url/url_util.h" ++#include "base/clang_work_around.h" + + #if BUILDFLAG(IS_CHROMEOS_LACROS) + #include "ui/base/data_transfer_policy/data_transfer_endpoint_serializer.h" +diff -up chromium-112.0.5615.49/base/i18n/break_iterator.cc.me chromium-112.0.5615.49/base/i18n/break_iterator.cc +--- chromium-112.0.5615.49/base/i18n/break_iterator.cc.me 2023-04-11 09:19:54.124933361 +0200 ++++ chromium-112.0.5615.49/base/i18n/break_iterator.cc 2023-04-11 09:20:14.790301819 +0200 +@@ -15,6 +15,7 @@ + #include "third_party/icu/source/common/unicode/ubrk.h" + #include "third_party/icu/source/common/unicode/uchar.h" + #include "third_party/icu/source/common/unicode/ustring.h" ++#include "base/clang_work_around.h" + + namespace base { + namespace i18n { +diff -up chromium-112.0.5615.49/base/i18n/message_formatter.cc.me chromium-112.0.5615.49/base/i18n/message_formatter.cc +--- chromium-112.0.5615.49/base/i18n/message_formatter.cc.me 2023-04-11 09:20:34.687657454 +0200 ++++ chromium-112.0.5615.49/base/i18n/message_formatter.cc 2023-04-11 09:21:28.617663963 +0200 +@@ -13,6 +13,7 @@ + #include "third_party/icu/source/common/unicode/utypes.h" + #include "third_party/icu/source/i18n/unicode/fmtable.h" + #include "third_party/icu/source/i18n/unicode/msgfmt.h" ++#include "base/clang_work_around.h" + + using icu::UnicodeString; + +diff -up chromium-112.0.5615.49/base/time/time.cc.me chromium-112.0.5615.49/base/time/time.cc +--- chromium-112.0.5615.49/base/time/time.cc.me 2023-04-11 09:23:22.732757775 +0200 ++++ chromium-112.0.5615.49/base/time/time.cc 2023-04-11 09:23:33.655958193 +0200 +@@ -17,6 +17,7 @@ + #include "base/time/time_override.h" + #include "build/build_config.h" + #include "third_party/abseil-cpp/absl/types/optional.h" ++#include "base/clang_work_around.h" + + namespace base { + +diff -up chromium-112.0.5615.49/chrome/browser/ui/webui/downloads/downloads_list_tracker.cc.me chromium-112.0.5615.49/chrome/browser/ui/webui/downloads/downloads_list_tracker.cc +--- chromium-112.0.5615.49/chrome/browser/ui/webui/downloads/downloads_list_tracker.cc.me 2023-04-11 09:36:50.646409434 +0200 ++++ chromium-112.0.5615.49/chrome/browser/ui/webui/downloads/downloads_list_tracker.cc 2023-04-11 09:37:07.977731153 +0200 +@@ -36,6 +36,7 @@ + #include "net/base/filename_util.h" + #include "third_party/icu/source/i18n/unicode/datefmt.h" + #include "ui/base/l10n/time_format.h" ++#include "base/clang_work_around.h" + + using content::BrowserContext; + using content::DownloadManager; +diff -up chromium-112.0.5615.49/chrome/browser/ui/webui/new_tab_page/untrusted_source.cc.me chromium-112.0.5615.49/chrome/browser/ui/webui/new_tab_page/untrusted_source.cc +--- chromium-112.0.5615.49/chrome/browser/ui/webui/new_tab_page/untrusted_source.cc.me 2023-04-11 09:37:21.262977759 +0200 ++++ chromium-112.0.5615.49/chrome/browser/ui/webui/new_tab_page/untrusted_source.cc 2023-04-11 09:37:27.594095277 +0200 +@@ -33,6 +33,7 @@ + #include "ui/base/resource/resource_bundle.h" + #include "ui/base/template_expressions.h" + #include "url/url_util.h" ++#include "base/clang_work_around.h" + + namespace { + +diff -up chromium-112.0.5615.49/components/autofill/content/renderer/html_based_username_detector.cc.me chromium-112.0.5615.49/components/autofill/content/renderer/html_based_username_detector.cc +--- chromium-112.0.5615.49/components/autofill/content/renderer/html_based_username_detector.cc.me 2023-04-11 09:38:01.297776504 +0200 ++++ chromium-112.0.5615.49/components/autofill/content/renderer/html_based_username_detector.cc 2023-04-11 09:38:07.899908357 +0200 +@@ -18,6 +18,7 @@ + #include "components/autofill/content/renderer/html_based_username_detector_vocabulary.h" + #include "components/autofill/core/common/form_data.h" + #include "third_party/blink/public/web/web_form_element.h" ++#include "base/clang_work_around.h" + + using blink::WebFormControlElement; + using blink::WebFormElement; +diff -up chromium-112.0.5615.49/components/autofill/core/browser/autofill_data_util.cc.me chromium-112.0.5615.49/components/autofill/core/browser/autofill_data_util.cc +--- chromium-112.0.5615.49/components/autofill/core/browser/autofill_data_util.cc.me 2023-04-11 09:33:59.637234801 +0200 ++++ chromium-112.0.5615.49/components/autofill/core/browser/autofill_data_util.cc 2023-04-11 09:34:08.353412198 +0200 +@@ -25,6 +25,7 @@ + #include "components/strings/grit/components_strings.h" + #include "third_party/icu/source/common/unicode/uscript.h" + #include "third_party/re2/src/re2/re2.h" ++#include "base/clang_work_around.h" + + namespace autofill { + namespace data_util { +diff -up chromium-112.0.5615.49/components/autofill/core/browser/data_model/borrowed_transliterator.cc.me chromium-112.0.5615.49/components/autofill/core/browser/data_model/borrowed_transliterator.cc +--- chromium-112.0.5615.49/components/autofill/core/browser/data_model/borrowed_transliterator.cc.me 2023-04-11 09:33:33.683706577 +0200 ++++ chromium-112.0.5615.49/components/autofill/core/browser/data_model/borrowed_transliterator.cc 2023-04-11 09:33:40.115837491 +0200 +@@ -6,6 +6,7 @@ + + #include "base/logging.h" + #include "base/no_destructor.h" ++#include "base/clang_work_around.h" + + namespace autofill { + +diff -up chromium-112.0.5615.49/components/autofill/core/browser/form_processing/label_processing_util.cc.me chromium-112.0.5615.49/components/autofill/core/browser/form_processing/label_processing_util.cc +--- chromium-112.0.5615.49/components/autofill/core/browser/form_processing/label_processing_util.cc.me 2023-04-11 09:35:15.569558729 +0200 ++++ chromium-112.0.5615.49/components/autofill/core/browser/form_processing/label_processing_util.cc 2023-04-11 09:35:22.156704236 +0200 +@@ -7,6 +7,7 @@ + #include "base/ranges/algorithm.h" + #include "base/strings/string_split.h" + #include "base/strings/utf_string_conversions.h" ++#include "base/clang_work_around.h" + + namespace autofill { + +diff -up chromium-112.0.5615.49/components/autofill/core/common/autofill_regexes.cc.me chromium-112.0.5615.49/components/autofill/core/common/autofill_regexes.cc +--- chromium-112.0.5615.49/components/autofill/core/common/autofill_regexes.cc.me 2023-04-11 09:24:03.442503498 +0200 ++++ chromium-112.0.5615.49/components/autofill/core/common/autofill_regexes.cc 2023-04-11 09:24:10.633634865 +0200 +@@ -12,6 +12,7 @@ + #include "base/check.h" + #include "base/i18n/unicodestring.h" + #include "base/memory/ptr_util.h" ++#include "base/clang_work_around.h" + + namespace { + +diff -up chromium-112.0.5615.49/components/bookmarks/browser/titled_url_index.cc.me chromium-112.0.5615.49/components/bookmarks/browser/titled_url_index.cc +--- chromium-112.0.5615.49/components/bookmarks/browser/titled_url_index.cc.me 2023-04-11 09:35:47.419224388 +0200 ++++ chromium-112.0.5615.49/components/bookmarks/browser/titled_url_index.cc 2023-04-11 09:35:53.917341490 +0200 +@@ -29,6 +29,7 @@ + #include "components/query_parser/snippet.h" + #include "third_party/icu/source/common/unicode/normalizer2.h" + #include "third_party/icu/source/common/unicode/utypes.h" ++#include "base/clang_work_around.h" + + namespace bookmarks { + +diff -up chromium-112.0.5615.49/components/omnibox/browser/tailored_word_break_iterator.cc.me chromium-112.0.5615.49/components/omnibox/browser/tailored_word_break_iterator.cc +--- chromium-112.0.5615.49/components/omnibox/browser/tailored_word_break_iterator.cc.me 2023-04-11 09:36:26.323925501 +0200 ++++ chromium-112.0.5615.49/components/omnibox/browser/tailored_word_break_iterator.cc 2023-04-11 09:36:32.480043078 +0200 +@@ -5,6 +5,7 @@ + #include "components/omnibox/browser/tailored_word_break_iterator.h" + + #include "base/strings/string_piece.h" ++#include "base/clang_work_around.h" + + namespace { + constexpr char16_t kUnderscore = '_'; +diff -up chromium-112.0.5615.49/components/sync/base/time.cc.me chromium-112.0.5615.49/components/sync/base/time.cc +--- chromium-112.0.5615.49/components/sync/base/time.cc.me 2023-04-11 09:32:48.709645320 +0200 ++++ chromium-112.0.5615.49/components/sync/base/time.cc 2023-04-11 09:32:56.044820918 +0200 +@@ -11,6 +11,7 @@ + #include "base/strings/utf_string_conversions.h" + #include "third_party/icu/source/common/unicode/utypes.h" + #include "third_party/icu/source/i18n/unicode/smpdtfmt.h" ++#include "base/clang_work_around.h" + + namespace syncer { + +diff -up chromium-112.0.5615.49/ui/base/x/selection_utils.cc.me chromium-112.0.5615.49/ui/base/x/selection_utils.cc +--- chromium-112.0.5615.49/ui/base/x/selection_utils.cc.me 2023-04-11 09:22:42.734023876 +0200 ++++ chromium-112.0.5615.49/ui/base/x/selection_utils.cc 2023-04-11 09:22:51.565185914 +0200 +@@ -18,6 +18,7 @@ + #include "base/strings/utf_string_conversions.h" + #include "ui/base/clipboard/clipboard_constants.h" + #include "ui/gfx/x/x11_atom_cache.h" ++#include "base/clang_work_around.h" + + namespace ui { + +diff -up chromium-112.0.5615.49/chrome/test/chromedriver/server/http_handler.cc.me chromium-112.0.5615.49/chrome/test/chromedriver/server/http_handler.cc +--- chromium-112.0.5615.49/chrome/test/chromedriver/server/http_handler.cc.me 2023-04-11 09:43:01.795293420 +0200 ++++ chromium-112.0.5615.49/chrome/test/chromedriver/server/http_handler.cc 2023-04-11 09:43:13.763545992 +0200 +@@ -46,6 +46,7 @@ + #include "services/network/public/mojom/url_loader_factory.mojom.h" + #include "services/network/transitional_url_loader_factory_owner.h" + #include "url/url_util.h" ++#include "base/clang_work_around.h" + + #if BUILDFLAG(IS_MAC) + #include "base/mac/scoped_nsautorelease_pool.h" diff --git a/chromium.spec b/chromium.spec index 60b81dc5..a5dcb5a4 100644 --- a/chromium.spec +++ b/chromium.spec @@ -376,6 +376,9 @@ Patch206: chromium-110-ozone-wayland-vaapi-support.patch # Apply these patches to work around EPEL8 issues Patch300: chromium-99.0.4844.51-rhel8-force-disable-use_gnome_keyring.patch +# workaround for bug in clang 14 with c++20 on rhel9, linker errors std::u16string +Patch301: chromium-112-workaround-llvm14-c++20-epel8.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 @@ -973,6 +976,10 @@ udev. %patch -P300 -p1 -b .disblegnomekeyring %endif +%if 0%{?rhel} == 8 +%patch -P301 -p1 -b .clang14_c++20 +%endif + # 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 \( -iname "*.py" \) -exec sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} + @@ -1121,12 +1128,6 @@ CHROMIUM_CORE_GN_DEFINES+=' use_gold=false' CHROMIUM_CORE_GN_DEFINES+=' target_cpu="arm64"' %endif -# clang =< 14 and C++20, linker errors std::u16string -# build failure on rhel8 -%if 0%{?rhel} == 8 -CHROMIUM_CORE_GN_DEFINES+=' use_cxx17=true' -%endif - CHROMIUM_CORE_GN_DEFINES+=' icu_use_data_file=true' CHROMIUM_CORE_GN_DEFINES+=' target_os="linux"' CHROMIUM_CORE_GN_DEFINES+=' current_os="linux"'