recipes-demo/homescreen/homescreen_git.bb: Bump SRCREV
[AGL/meta-agl-demo.git] / recipes-wam / cef / files / chromium / 0007-meta-browser-Remove-the-GN-settings-done-for-clang-t.patch
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
5  that conflict with OE
6
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
9
10 --target option and -no-canonical-prefixes options result in clang
11
12 finding the headers in target sysroot
13
14 Upstream-Status: Inappropriate [OE-Specific]
15
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>
20 ---
21  build/config/compiler/BUILD.gn | 38 ----------------------------------
22  1 file changed, 38 deletions(-)
23
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") {
29          ]
30        }
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" ]
36 -      }
37        if (!is_nacl) {
38          cflags += [
39            "-march=$arm_arch",
40 @@ -1126,12 +1121,6 @@ config("compiler_cpu_abi") {
41        if (arm_tune != "") {
42          cflags += [ "-mtune=$arm_tune" ]
43        }
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" ]
49 -      }
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") {
54            if (is_android) {
55              cflags += [ "--target=mipsel-linux-android" ]
56              ldflags += [ "--target=mipsel-linux-android" ]
57 -          } else {
58 -            cflags += [ "--target=mipsel-linux-gnu" ]
59 -            ldflags += [ "--target=mipsel-linux-gnu" ]
60            }
61          } else {
62            cflags += [ "-EL" ]
63 @@ -1221,8 +1207,6 @@ config("compiler_cpu_abi") {
64        ldflags += [ "-Wl,--hash-style=sysv" ]
65        if (custom_toolchain == "") {
66          if (is_clang) {
67 -          cflags += [ "--target=mips-linux-gnu" ]
68 -          ldflags += [ "--target=mips-linux-gnu" ]
69          } else {
70            cflags += [ "-EB" ]
71            ldflags += [ "-EB" ]
72 @@ -1270,9 +1254,6 @@ config("compiler_cpu_abi") {
73            if (is_android) {
74              cflags += [ "--target=mips64el-linux-android" ]
75              ldflags += [ "--target=mips64el-linux-android" ]
76 -          } else {
77 -            cflags += [ "--target=mips64el-linux-gnuabi64" ]
78 -            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
79            }
80          } else {
81            cflags += [
82 @@ -1330,8 +1311,6 @@ config("compiler_cpu_abi") {
83        ldflags += [ "-Wl,--hash-style=sysv" ]
84        if (custom_toolchain == "") {
85          if (is_clang) {
86 -          cflags += [ "--target=mips64-linux-gnuabi64" ]
87 -          ldflags += [ "--target=mips64-linux-gnuabi64" ]
88          } else {
89            cflags += [
90              "-EB",
91 @@ -1494,23 +1473,6 @@ config("compiler_deterministic") {
92        }
93      }
94    }
95 -
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" ]
101 -
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.
108 -    if (!is_win) {
109 -      ldflags += [ "-no-canonical-prefixes" ]
110 -    }
111 -  }
112  }
113  
114  config("clang_revision") {
115 -- 
116 2.42.1
117