Skip to content

Commit 6d5fb3c

Browse files
committed
chromium: [PATCH] Disable unsupported CREL compiler option
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 <[email protected]>
1 parent d917c4e commit 6d5fb3c

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

meta-chromium/recipes-browser/chromium/files/0004-Delete-compiler-options-not-available-in-release-ver.patch

+28-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,45 @@
1-
From 75b620ad19491a1f8b8e9ec891d242d017016972 Mon Sep 17 00:00:00 2001
1+
From fc3a1af7d8d6ed6bc54d096e72cbf3d35ff4fa97 Mon Sep 17 00:00:00 2001
22
From: Khem Raj <[email protected]>
33
Date: Wed, 4 Dec 2019 19:06:54 -0800
44
Subject: [PATCH] Delete compiler options not available in release versions of
55
clang _yet_
66

7+
* CREL feature is not supported on the current clang toolchain version,
8+
which causes build to fail with the following error:
9+
10+
| clang++: error: unsupported argument '--crel' to option '-Wa,'
11+
| clang++: error: unsupported argument '--allow-experimental-crel'
12+
to option '-Wa,'
13+
714
Upstream-Status: Inappropriate [ clang/master already supports them ]
815
Signed-off-by: Khem Raj <[email protected]>
916
Signed-off-by: Randy MacLeod <[email protected]>
17+
Signed-off-by: Ariel D'Alessandro <[email protected]>
1018

1119
---
12-
build/config/compiler/BUILD.gn | 5 +++++
13-
1 file changed, 5 insertions(+)
20+
build/config/compiler/BUILD.gn | 13 +++++--------
21+
1 file changed, 5 insertions(+), 8 deletions(-)
1422

1523
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
16-
index 309c3078a2..8951f6006c 100644
24+
index 309c3078a2647..5eeb241fc9038 100644
1725
--- a/build/config/compiler/BUILD.gn
1826
+++ b/build/config/compiler/BUILD.gn
19-
@@ -1924,6 +1924,11 @@ config("default_warnings") {
27+
@@ -615,14 +615,6 @@ config("compiler") {
28+
} else {
29+
cflags += [ "-ffp-contract=off" ]
30+
}
31+
-
32+
- # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
33+
- # (excluding toolchains that use an older version of LLVM).
34+
- # TODO(crbug.com/376278218): This causes segfault on Linux ARM builds.
35+
- if (is_linux && !llvm_android_mainline && current_cpu != "arm" &&
36+
- default_toolchain != "//build/toolchain/cros:target") {
37+
- cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
38+
- }
39+
}
40+
41+
# C11/C++11 compiler flags setup.
42+
@@ -1924,6 +1916,11 @@ config("default_warnings") {
2043
}
2144

2245
cflags += [

0 commit comments

Comments
 (0)