From 717a675e0fc20d235aa347dc0bc182709ef4e926 Mon Sep 17 00:00:00 2001 From: spotrh Date: Tue, 20 Sep 2022 16:24:01 -0400 Subject: [PATCH] fix aarch64 builds so they do not try to use clang only flag --- chromium-105.0.5195.125-arm64-gcc-fix.patch | 12 ++++++++++++ chromium.spec | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 chromium-105.0.5195.125-arm64-gcc-fix.patch diff --git a/chromium-105.0.5195.125-arm64-gcc-fix.patch b/chromium-105.0.5195.125-arm64-gcc-fix.patch new file mode 100644 index 00000000..d9ad16a2 --- /dev/null +++ b/chromium-105.0.5195.125-arm64-gcc-fix.patch @@ -0,0 +1,12 @@ +diff -up chromium-105.0.5195.125/v8/BUILD.gn.arm64-gcc-fix chromium-105.0.5195.125/v8/BUILD.gn +--- chromium-105.0.5195.125/v8/BUILD.gn.arm64-gcc-fix 2022-09-20 18:12:30.766293126 +0000 ++++ chromium-105.0.5195.125/v8/BUILD.gn 2022-09-20 18:13:04.376435347 +0000 +@@ -1095,7 +1095,7 @@ config("toolchain") { + defines += [ "V8_TARGET_ARCH_ARM64" ] + if (current_cpu == "arm64") { + # This will enable PAC+BTI in code generation and static code. +- if (v8_control_flow_integrity && ++ if (v8_control_flow_integrity && is_clang && + (!build_with_chromium || arm_control_flow_integrity == "standard")) { + cflags += [ "-mbranch-protection=standard" ] + asmflags = [ "-mmark-bti-property" ] diff --git a/chromium.spec b/chromium.spec index d9f1a542..07465ac0 100644 --- a/chromium.spec +++ b/chromium.spec @@ -350,6 +350,9 @@ Patch86: chromium-94.0.4606.81-clang-format.patch # This is only in Fedora 37+ Patch87: chromium-99.0.4844.84-markdownsafe-soft_str.patch +# There is a corner case where v8 tries to pass a clang only flag without checking is_clang +Patch88: chromium-105.0.5195.125-arm64-gcc-fix.patch + # Fix extra qualification error Patch97: chromium-103.0.5060.53-remoting-extra-qualification.patch # From gentoo @@ -1066,6 +1069,7 @@ udev. %if 0%{?fedora} >= 37 %patch87 -p1 -b .markdownsafe-soft_str %endif +%patch88 -p1 -b .arm64-gcc-fix %patch97 -p1 -b .remoting-extra-qualification %patch98 -p1 -b .InkDropHost-crash %patch99 -p1 -b .enable-WebRTCPipeWireCapturer-byDefault