Skip to content

Commit ebb3d18

Browse files
committed
chromium: [PATCH] build/config/compiler/BUILD.gn: Disable CREL
This feature is not supported on the current clang toolchain version, which causes build to fail with the following error: | clang++: error: unsupported argument '--crel' to option '-Wa,' | clang++: error: unsupported argument '--allow-experimental-crel' to option '-Wa,' Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
1 parent 6afa938 commit ebb3d18

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ SRC_URI += "\
2727
file://0010-Don-t-require-profiler_builtins.rlib.patch \
2828
file://0011-Disable-crabbyavif-to-fix-build-errors.patch \
2929
file://0012-Revert-Allow-and-use-std-hardware_destructive_interf.patch \
30+
file://0013-build-config-compiler-BUILD.gn-Disable-CREL.patch \
3031
"
3132
# ARM/AArch64-specific patches.
3233
SRC_URI:append:aarch64 = "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '', ' file://arm/0001-Fix-AES-crypto-SIGILL-on-rpi4-64.patch', d)}"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From eaed059ebb89fb3149a9cb64f7ed9df35cae27e2 Mon Sep 17 00:00:00 2001
2+
From: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
3+
Date: Wed, 30 Oct 2024 18:35:52 -0300
4+
Subject: [PATCH] build/config/compiler/BUILD.gn: Disable CREL
5+
6+
This feature is not supported on the current clang toolchain version,
7+
which causes build to fail with the following error:
8+
9+
| clang++: error: unsupported argument '--crel' to option '-Wa,'
10+
| clang++: error: unsupported argument '--allow-experimental-crel'
11+
to option '-Wa,'
12+
13+
Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
14+
---
15+
build/config/compiler/BUILD.gn | 8 --------
16+
1 file changed, 8 deletions(-)
17+
18+
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
19+
index 50b032cc03436..b968616f8e80d 100644
20+
--- a/build/config/compiler/BUILD.gn
21+
+++ b/build/config/compiler/BUILD.gn
22+
@@ -597,14 +597,6 @@ config("compiler") {
23+
} else {
24+
cflags += [ "-ffp-contract=off" ]
25+
}
26+
-
27+
- # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
28+
- # (excluding toolchains that use an older version of LLVM).
29+
- # TODO(crbug.com/376278218): This causes segfault on Linux ARM builds.
30+
- if (is_linux && !llvm_android_mainline && current_cpu != "arm" &&
31+
- default_toolchain != "//build/toolchain/cros:target") {
32+
- cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
33+
- }
34+
}
35+
36+
# C11/C++11 compiler flags setup.

0 commit comments

Comments
 (0)