summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <sultan@gentoo.org>2022-01-03 19:19:31 +0100
committerStephan Hartmann <sultan@gentoo.org>2022-01-03 19:20:18 +0100
commit955fd16c7f4bb915f6ba5531443b8df8fb220632 (patch)
tree70a2ad9035e97ee7bf735c4cc74717b42feaabd6 /www-client/chromium/files
parentdev-python/ipython: Stabilize 7.30.1 ALLARCHES, #830540 (diff)
downloadgentoo-955fd16c7f4bb915f6ba5531443b8df8fb220632.tar.gz
gentoo-955fd16c7f4bb915f6ba5531443b8df8fb220632.tar.bz2
gentoo-955fd16c7f4bb915f6ba5531443b8df8fb220632.zip
www-client/chromium: fix build on arm64 with clang (M97)
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Stephan Hartmann <sultan@gentoo.org>
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r--www-client/chromium/files/chromium-97-arm64-mte-clang.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-97-arm64-mte-clang.patch b/www-client/chromium/files/chromium-97-arm64-mte-clang.patch
new file mode 100644
index 000000000000..e86110bfb0ea
--- /dev/null
+++ b/www-client/chromium/files/chromium-97-arm64-mte-clang.patch
@@ -0,0 +1,34 @@
+From c04406585217092f85f3188dab4875b7be78af1d Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Thu, 02 Dec 2021 16:56:39 +0000
+Subject: [PATCH] base: enable mte via -Xclang instead
+
+-march is fragile as it may get overridden later on by
+e.g. distributors.
+
+Bug: 1137393
+Change-Id: Ia6b98491ef6f955929d0699e9f435844de48e1da
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3310965
+Reviewed-by: Kentaro Hara <haraken@chromium.org>
+Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
+Cr-Commit-Position: refs/heads/main@{#947530}
+---
+
+diff --git a/base/BUILD.gn b/base/BUILD.gn
+index df6293d..eaa02b7 100644
+--- a/base/BUILD.gn
++++ b/base/BUILD.gn
+@@ -104,7 +104,12 @@
+ # but they're not backwards compatible. Use base::CPU::has_mte()
+ # beforehand to confirm or use indirect functions (ifuncs) to select
+ # an MTE-specific implementation at dynamic link-time.
+- cflags = [ "-march=armv8-a+memtag" ]
++ cflags = [
++ "-Xclang",
++ "-target-feature",
++ "-Xclang",
++ "+mte",
++ ]
+ }
+ }
+