1 |
commit: 955fd16c7f4bb915f6ba5531443b8df8fb220632 |
2 |
Author: Stephan Hartmann <sultan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 3 18:19:31 2022 +0000 |
4 |
Commit: Stephan Hartmann <sultan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 3 18:20:18 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=955fd16c |
7 |
|
8 |
www-client/chromium: fix build on arm64 with clang (M97) |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org> |
12 |
|
13 |
www-client/chromium/chromium-97.0.4692.71.ebuild | 3 +- |
14 |
.../files/chromium-97-arm64-mte-clang.patch | 34 ++++++++++++++++++++++ |
15 |
2 files changed, 36 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/www-client/chromium/chromium-97.0.4692.71.ebuild b/www-client/chromium/chromium-97.0.4692.71.ebuild |
18 |
index bf72c0ce4bb4..65119a3ae012 100644 |
19 |
--- a/www-client/chromium/chromium-97.0.4692.71.ebuild |
20 |
+++ b/www-client/chromium/chromium-97.0.4692.71.ebuild |
21 |
@@ -1,4 +1,4 @@ |
22 |
-# Copyright 2009-2021 Gentoo Authors |
23 |
+# Copyright 2009-2022 Gentoo Authors |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
EAPI=8 |
27 |
@@ -231,6 +231,7 @@ src_prepare() { |
28 |
"${WORKDIR}/patches" |
29 |
"${FILESDIR}/chromium-93-InkDropHost-crash.patch" |
30 |
"${FILESDIR}/chromium-96-EnumTable-crash.patch" |
31 |
+ "${FILESDIR}/chromium-97-arm64-mte-clang.patch" |
32 |
"${FILESDIR}/chromium-glibc-2.34.patch" |
33 |
"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch" |
34 |
"${FILESDIR}/chromium-shim_headers.patch" |
35 |
|
36 |
diff --git a/www-client/chromium/files/chromium-97-arm64-mte-clang.patch b/www-client/chromium/files/chromium-97-arm64-mte-clang.patch |
37 |
new file mode 100644 |
38 |
index 000000000000..e86110bfb0ea |
39 |
--- /dev/null |
40 |
+++ b/www-client/chromium/files/chromium-97-arm64-mte-clang.patch |
41 |
@@ -0,0 +1,34 @@ |
42 |
+From c04406585217092f85f3188dab4875b7be78af1d Mon Sep 17 00:00:00 2001 |
43 |
+From: Stephan Hartmann <stha09@××××××××××.com> |
44 |
+Date: Thu, 02 Dec 2021 16:56:39 +0000 |
45 |
+Subject: [PATCH] base: enable mte via -Xclang instead |
46 |
+ |
47 |
+-march is fragile as it may get overridden later on by |
48 |
+e.g. distributors. |
49 |
+ |
50 |
+Bug: 1137393 |
51 |
+Change-Id: Ia6b98491ef6f955929d0699e9f435844de48e1da |
52 |
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3310965 |
53 |
+Reviewed-by: Kentaro Hara <haraken@××××××××.org> |
54 |
+Commit-Queue: Stephan Hartmann <stha09@××××××××××.com> |
55 |
+Cr-Commit-Position: refs/heads/main@{#947530} |
56 |
+--- |
57 |
+ |
58 |
+diff --git a/base/BUILD.gn b/base/BUILD.gn |
59 |
+index df6293d..eaa02b7 100644 |
60 |
+--- a/base/BUILD.gn |
61 |
++++ b/base/BUILD.gn |
62 |
+@@ -104,7 +104,12 @@ |
63 |
+ # but they're not backwards compatible. Use base::CPU::has_mte() |
64 |
+ # beforehand to confirm or use indirect functions (ifuncs) to select |
65 |
+ # an MTE-specific implementation at dynamic link-time. |
66 |
+- cflags = [ "-march=armv8-a+memtag" ] |
67 |
++ cflags = [ |
68 |
++ "-Xclang", |
69 |
++ "-target-feature", |
70 |
++ "-Xclang", |
71 |
++ "+mte", |
72 |
++ ] |
73 |
+ } |
74 |
+ } |
75 |
+ |