From 07ebb27a114dd539247ae4bf6a1514d4ddd5c53a Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 10 Feb 2025 14:30:40 +0100 Subject: [PATCH] Fix build error due to old clang18 in el 8/9 and f40 --- chromium-133-clang18-template.patch | 12 ++++++++++++ chromium.spec | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 chromium-133-clang18-template.patch diff --git a/chromium-133-clang18-template.patch b/chromium-133-clang18-template.patch new file mode 100644 index 00000000..f95aa579 --- /dev/null +++ b/chromium-133-clang18-template.patch @@ -0,0 +1,12 @@ +diff -up chromium-133.0.6943.53/chrome/browser/compose/compose_session.cc.me chromium-133.0.6943.53/chrome/browser/compose/compose_session.cc +--- chromium-133.0.6943.53/chrome/browser/compose/compose_session.cc.me 2025-02-10 14:16:34.810693753 +0100 ++++ chromium-133.0.6943.53/chrome/browser/compose/compose_session.cc 2025-02-10 14:16:39.747791800 +0100 +@@ -543,7 +543,7 @@ void ComposeSession::RequestWithSession( + // execution in case request fails. + compose::LogComposeRequestReason(request_reason); + +- optimization_guide::ModelExecutionSessionCallbackWithLogging callback = ++ optimization_guide::ModelExecutionSessionCallbackWithLogging callback = + base::BindRepeating(&ComposeSession::ModelExecutionCallback, + weak_ptr_factory_.GetWeakPtr(), + std::move(request_timer), request_id_, request_reason, diff --git a/chromium.spec b/chromium.spec index fc2691ac..893d6eb1 100644 --- a/chromium.spec +++ b/chromium.spec @@ -333,9 +333,11 @@ Patch306: chromium-127-el8-ifunc-header.patch # workaround for build error due to old atk version on el8 Patch307: chromium-133-el8-atk-compiler-error.patch +# Fix build errors due to old clang18 in el 8/9 and f40 Patch308: chromium-132-el8-unsupport-clang-flags.patch Patch309: chromium-132-el8-unsupport-rustc-flags.patch Patch310: chromium-132-el8-clang18-build-error.patch +Patch311: chromium-133-clang18-template.patch # enable fstack-protector-strong Patch312: chromium-123-fstack-protector-strong.patch @@ -1029,6 +1031,7 @@ Qt6 UI for chromium. %patch -P308 -p1 -b .el8-unsupport-clang-flags %patch -P309 -p1 -b .el8-unsupport-rustc-flags %patch -P310 -p1 -b .el8-clang18-build-error +%patch -P311 -p1 -b .clang18-template %endif %patch -P312 -p1 -b .fstack-protector-strong