1 From 22de50ac2371aed1e04e4cb248beabb7f8ad3ebe Mon Sep 17 00:00:00 2001
2 From: Roger Zanoni <rzanoni@igalia.com>
3 Date: Thu, 27 Apr 2023 16:16:28 +0200
4 Subject: [PATCH 3/9] Remove the GN settings done for clang that conflict with
7 clang cross compiler that is build with meta-clang has lot of these
8 settings built-in and specifying them here confuses the compiler
10 --target option and -no-canonical-prefixes options result in clang
12 finding the headers in target sysroot
14 Upstream-Status: Inappropriate [OE-Specific]
16 Signed-off-by: Khem Raj <raj.khem@gmail.com>
17 Rebased-by: Maksim Sisov <msisov@igalia.com>
18 Rebased-by: Randy MacLeod <randy.macleod@windriver.com>
19 Rebased-by: Roger Zanoni <rzanoni@igalia.com>
21 build/config/compiler/BUILD.gn | 37 ----------------------------------
22 1 file changed, 37 deletions(-)
24 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
25 index 531b326c498d0..244a6757613d5 100644
26 --- a/build/config/compiler/BUILD.gn
27 +++ b/build/config/compiler/BUILD.gn
28 @@ -924,11 +924,6 @@ config("compiler_cpu_abi") {
31 } else if (current_cpu == "arm") {
32 - if (is_clang && !is_android && !is_nacl &&
33 - !(is_chromeos_lacros && is_chromeos_device)) {
34 - cflags += [ "--target=arm-linux-gnueabihf" ]
35 - ldflags += [ "--target=arm-linux-gnueabihf" ]
40 @@ -939,11 +934,6 @@ config("compiler_cpu_abi") {
41 cflags += [ "-mtune=$arm_tune" ]
43 } else if (current_cpu == "arm64") {
44 - if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
45 - !(is_chromeos_lacros && is_chromeos_device)) {
46 - cflags += [ "--target=aarch64-linux-gnu" ]
47 - ldflags += [ "--target=aarch64-linux-gnu" ]
50 # Outline atomics crash on Exynos 9810. http://crbug.com/1272795
51 cflags += [ "-mno-outline-atomics" ]
52 @@ -955,9 +945,6 @@ config("compiler_cpu_abi") {
54 cflags += [ "--target=mipsel-linux-android" ]
55 ldflags += [ "--target=mipsel-linux-android" ]
57 - cflags += [ "--target=mipsel-linux-gnu" ]
58 - ldflags += [ "--target=mipsel-linux-gnu" ]
62 @@ -1037,8 +1024,6 @@ config("compiler_cpu_abi") {
63 ldflags += [ "-Wl,--hash-style=sysv" ]
64 if (custom_toolchain == "") {
66 - cflags += [ "--target=mips-linux-gnu" ]
67 - ldflags += [ "--target=mips-linux-gnu" ]
71 @@ -1086,9 +1071,6 @@ config("compiler_cpu_abi") {
73 cflags += [ "--target=mips64el-linux-android" ]
74 ldflags += [ "--target=mips64el-linux-android" ]
76 - cflags += [ "--target=mips64el-linux-gnuabi64" ]
77 - ldflags += [ "--target=mips64el-linux-gnuabi64" ]
81 @@ -1146,8 +1128,6 @@ config("compiler_cpu_abi") {
82 ldflags += [ "-Wl,--hash-style=sysv" ]
83 if (custom_toolchain == "") {
85 - cflags += [ "--target=mips64-linux-gnuabi64" ]
86 - ldflags += [ "--target=mips64-linux-gnuabi64" ]
90 @@ -1309,23 +1289,6 @@ config("compiler_deterministic") {
95 - # Tells the compiler not to use absolute paths when passing the default
96 - # paths to the tools it invokes. We don't want this because we don't
97 - # really need it and it can mess up the goma cache entries.
98 - if (is_clang && (!is_nacl || is_nacl_saigo)) {
99 - cflags += [ "-no-canonical-prefixes" ]
101 - # Same for links: Let the compiler driver invoke the linker
102 - # with a relative path and pass relative paths to built-in
103 - # libraries. Not needed on Windows because we call the linker
104 - # directly there, not through the compiler driver.
105 - # We don't link on goma, so this change is just for cleaner
106 - # internal linker invocations, for people who work on the build.
108 - ldflags += [ "-no-canonical-prefixes" ]
113 config("clang_revision") {