1
- From 7eb6877c15ab9d73c9a7cf3a8a17a1a23f7396f9 Mon Sep 17 00:00:00 2001
2
- From: Khem Raj <raj.khem@gmail .com>
3
- Date: Mon, 29 Apr 2019 12:00 :19 +0300
4
- Subject: [PATCH] Remove the GN settings done for clang that conflict with OE
1
+ From b49388c4ee899f7a424a1f1df52868eed1e9c83f Mon Sep 17 00:00:00 2001
2
+ From: Max Ihlenfeldt <max@igalia .com>
3
+ Date: Tue, 25 Jun 2024 11:06 :19 +0000
4
+ Subject: [PATCH] Drop GN compiler settings conflicting with OE
5
5
6
- clang cross compiler that is build with meta-clang has lot of these
7
- settings built-in and specifying them here confuses the compiler
8
-
9
- - -target option and -no-canonical-prefixes options result in clang
10
-
11
- finding the headers in target sysroot
6
+ The clang cross compiler built with meta-clang has lots of these
7
+ settings built-in and specifying them with GN confuses the compiler:
8
+ * The --target and -no-canonical-prefixes options result in clang
9
+ finding the headers in target sysroot.
10
+ * GN tries to guess the right values for march/mtune/float-abi, but the
11
+ OE config machinary has computed these values already and fed it via
12
+ compiler cmdline to the Chromium build.
12
13
13
14
Upstream-Status: Inappropriate [OE-Specific]
14
-
15
15
Signed-off-by: Khem Raj <
[email protected] >
16
- Rebased-by: Maksim Sisov <
[email protected] >
17
- Rebased-by: Randy MacLeod <
[email protected] >
18
-
16
+ Signed-off-by: Max Ihlenfeldt <
[email protected] >
19
17
---
20
- build/config/compiler/BUILD.gn | 38 ----------------------------------
21
- 1 file changed, 38 deletions(-)
18
+ build/config/compiler/BUILD.gn | 48 ----------------------------------
19
+ 1 file changed, 48 deletions(-)
22
20
23
21
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
24
- index 973d8bc..8165472 100644
22
+ index 973d8bc..f0ffab2 100644
25
23
--- a/build/config/compiler/BUILD.gn
26
24
+++ b/build/config/compiler/BUILD.gn
27
- @@ -1198,11 +1198,6 @@ config("compiler_cpu_abi") {
25
+ @@ -1197,27 +1197,6 @@ config("compiler_cpu_abi") {
26
+ "-msse3",
28
27
]
29
28
}
30
- } else if (current_cpu == "arm") {
29
+ - } else if (current_cpu == "arm") {
31
30
- if (is_clang && !is_android && !is_nacl &&
32
31
- !(is_chromeos_lacros && is_chromeos_device)) {
33
32
- cflags += [ "--target=arm-linux-gnueabihf" ]
34
33
- ldflags += [ "--target=arm-linux-gnueabihf" ]
35
34
- }
36
- if (!is_nacl) {
37
- cflags += [
38
- "-march=$arm_arch",
39
- @@ -1212,12 +1207,6 @@ config("compiler_cpu_abi") {
40
- if (arm_tune != "") {
41
- cflags += [ "-mtune=$arm_tune" ]
42
- }
35
+ - if (!is_nacl) {
36
+ - cflags += [
37
+ - "-march=$arm_arch",
38
+ - "-mfloat-abi=$arm_float_abi",
39
+ - ]
40
+ - }
41
+ - if (arm_tune != "") {
42
+ - cflags += [ "-mtune=$arm_tune" ]
43
+ - }
43
44
- } else if (current_cpu == "arm64") {
44
45
- if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
45
46
- !(is_chromeos_lacros && is_chromeos_device)) {
@@ -49,7 +50,7 @@ index 973d8bc..8165472 100644
49
50
} else if (current_cpu == "mipsel" && !is_nacl) {
50
51
ldflags += [ "-Wl,--hash-style=sysv" ]
51
52
if (custom_toolchain == "") {
52
- @@ -1225,9 +1214 ,6 @@ config("compiler_cpu_abi") {
53
+ @@ -1225,9 +1204 ,6 @@ config("compiler_cpu_abi") {
53
54
if (is_android) {
54
55
cflags += [ "--target=mipsel-linux-android" ]
55
56
ldflags += [ "--target=mipsel-linux-android" ]
@@ -59,7 +60,7 @@ index 973d8bc..8165472 100644
59
60
}
60
61
} else {
61
62
cflags += [ "-EL" ]
62
- @@ -1307,8 +1293 ,6 @@ config("compiler_cpu_abi") {
63
+ @@ -1307,8 +1283 ,6 @@ config("compiler_cpu_abi") {
63
64
ldflags += [ "-Wl,--hash-style=sysv" ]
64
65
if (custom_toolchain == "") {
65
66
if (is_clang) {
@@ -68,7 +69,7 @@ index 973d8bc..8165472 100644
68
69
} else {
69
70
cflags += [ "-EB" ]
70
71
ldflags += [ "-EB" ]
71
- @@ -1356,9 +1340 ,6 @@ config("compiler_cpu_abi") {
72
+ @@ -1356,9 +1330 ,6 @@ config("compiler_cpu_abi") {
72
73
if (is_android) {
73
74
cflags += [ "--target=mips64el-linux-android" ]
74
75
ldflags += [ "--target=mips64el-linux-android" ]
@@ -78,7 +79,7 @@ index 973d8bc..8165472 100644
78
79
}
79
80
} else {
80
81
cflags += [
81
- @@ -1416,8 +1397 ,6 @@ config("compiler_cpu_abi") {
82
+ @@ -1416,8 +1387 ,6 @@ config("compiler_cpu_abi") {
82
83
ldflags += [ "-Wl,--hash-style=sysv" ]
83
84
if (custom_toolchain == "") {
84
85
if (is_clang) {
@@ -87,7 +88,7 @@ index 973d8bc..8165472 100644
87
88
} else {
88
89
cflags += [
89
90
"-EB",
90
- @@ -1580,23 +1559 ,6 @@ config("compiler_deterministic") {
91
+ @@ -1580,23 +1549 ,6 @@ config("compiler_deterministic") {
91
92
}
92
93
}
93
94
}
0 commit comments