1 From 89705cfc3a4e677dd97db36c3dc9b0aa97515760 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 07/33] [meta-browser] Remove the GN settings done for clang
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 | 38 ----------------------------------
22 1 file changed, 38 deletions(-)
24 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
25 index 06812fb9c2188..db763b998c4fb 100644
26 --- a/build/config/compiler/BUILD.gn
27 +++ b/build/config/compiler/BUILD.gn
28 @@ -1112,11 +1112,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 @@ -1126,12 +1121,6 @@ config("compiler_cpu_abi") {
42 cflags += [ "-mtune=$arm_tune" ]
44 - } else if (current_cpu == "arm64") {
45 - if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
46 - !(is_chromeos_lacros && is_chromeos_device)) {
47 - cflags += [ "--target=aarch64-linux-gnu" ]
48 - ldflags += [ "--target=aarch64-linux-gnu" ]
50 } else if (current_cpu == "mipsel" && !is_nacl) {
51 ldflags += [ "-Wl,--hash-style=sysv" ]
52 if (custom_toolchain == "") {
53 @@ -1139,9 +1128,6 @@ config("compiler_cpu_abi") {
55 cflags += [ "--target=mipsel-linux-android" ]
56 ldflags += [ "--target=mipsel-linux-android" ]
58 - cflags += [ "--target=mipsel-linux-gnu" ]
59 - ldflags += [ "--target=mipsel-linux-gnu" ]
63 @@ -1221,8 +1207,6 @@ config("compiler_cpu_abi") {
64 ldflags += [ "-Wl,--hash-style=sysv" ]
65 if (custom_toolchain == "") {
67 - cflags += [ "--target=mips-linux-gnu" ]
68 - ldflags += [ "--target=mips-linux-gnu" ]
72 @@ -1270,9 +1254,6 @@ config("compiler_cpu_abi") {
74 cflags += [ "--target=mips64el-linux-android" ]
75 ldflags += [ "--target=mips64el-linux-android" ]
77 - cflags += [ "--target=mips64el-linux-gnuabi64" ]
78 - ldflags += [ "--target=mips64el-linux-gnuabi64" ]
82 @@ -1330,8 +1311,6 @@ config("compiler_cpu_abi") {
83 ldflags += [ "-Wl,--hash-style=sysv" ]
84 if (custom_toolchain == "") {
86 - cflags += [ "--target=mips64-linux-gnuabi64" ]
87 - ldflags += [ "--target=mips64-linux-gnuabi64" ]
91 @@ -1494,23 +1473,6 @@ config("compiler_deterministic") {
96 - # Tells the compiler not to use absolute paths when passing the default
97 - # paths to the tools it invokes. We don't want this because we don't
98 - # really need it and it can mess up the goma cache entries.
99 - if (is_clang && (!is_nacl || is_nacl_saigo)) {
100 - cflags += [ "-no-canonical-prefixes" ]
102 - # Same for links: Let the compiler driver invoke the linker
103 - # with a relative path and pass relative paths to built-in
104 - # libraries. Not needed on Windows because we call the linker
105 - # directly there, not through the compiler driver.
106 - # We don't link on goma, so this change is just for cleaner
107 - # internal linker invocations, for people who work on the build.
109 - ldflags += [ "-no-canonical-prefixes" ]
114 config("clang_revision") {