HYL_OK3568_LINUX/yocto/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-fix-build-with-clang.patch
2025-05-10 21:49:39 +08:00

92 lines
3.3 KiB
Diff

From a88d4dfdb0f9d27a0acc8f28167fbb09d913fd75 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 2 Feb 2019 19:28:59 -0800
Subject: [PATCH] chromium: fix build with clang
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/build/config/compiler/BUILD.gn | 27 ++-----------------------
1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
index b511a58c5a8..b628042bc21 100644
--- a/chromium/build/config/compiler/BUILD.gn
+++ b/chromium/build/config/compiler/BUILD.gn
@@ -783,8 +783,6 @@ config("compiler_cpu_abi") {
}
} else if (current_cpu == "arm") {
if (is_clang && !is_android && !is_nacl) {
- cflags += [ "--target=arm-linux-gnueabihf" ]
- ldflags += [ "--target=arm-linux-gnueabihf" ]
}
if (!is_nacl) {
cflags += [
@@ -797,8 +795,6 @@ config("compiler_cpu_abi") {
}
} else if (current_cpu == "arm64") {
if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
- cflags += [ "--target=aarch64-linux-gnu" ]
- ldflags += [ "--target=aarch64-linux-gnu" ]
}
} else if (current_cpu == "mipsel" && !is_nacl) {
ldflags += [ "-Wl,--hash-style=sysv" ]
@@ -807,9 +803,6 @@ config("compiler_cpu_abi") {
if (is_android) {
cflags += [ "--target=mipsel-linux-android" ]
ldflags += [ "--target=mipsel-linux-android" ]
- } else {
- cflags += [ "--target=mipsel-linux-gnu" ]
- ldflags += [ "--target=mipsel-linux-gnu" ]
}
} else {
cflags += [ "-EL" ]
@@ -888,10 +881,7 @@ config("compiler_cpu_abi") {
} else if (current_cpu == "mips" && !is_nacl) {
ldflags += [ "-Wl,--hash-style=sysv" ]
if (custom_toolchain == "") {
- if (is_clang) {
- cflags += [ "--target=mips-linux-gnu" ]
- ldflags += [ "--target=mips-linux-gnu" ]
- } else {
+ if (!is_clang) {
cflags += [ "-EB" ]
ldflags += [ "-EB" ]
}
@@ -938,9 +928,6 @@ config("compiler_cpu_abi") {
if (is_android) {
cflags += [ "--target=mips64el-linux-android" ]
ldflags += [ "--target=mips64el-linux-android" ]
- } else {
- cflags += [ "--target=mips64el-linux-gnuabi64" ]
- ldflags += [ "--target=mips64el-linux-gnuabi64" ]
}
} else {
cflags += [
@@ -997,10 +984,7 @@ config("compiler_cpu_abi") {
} else if (current_cpu == "mips64") {
ldflags += [ "-Wl,--hash-style=sysv" ]
if (custom_toolchain == "") {
- if (is_clang) {
- cflags += [ "--target=mips64-linux-gnuabi64" ]
- ldflags += [ "--target=mips64-linux-gnuabi64" ]
- } else {
+ if (!is_clang) {
cflags += [
"-EB",
"-mabi=64",
@@ -1167,13 +1151,6 @@ config("compiler_deterministic") {
}
}
}
-
- # Tells the compiler not to use absolute paths when passing the default
- # paths to the tools it invokes. We don't want this because we don't
- # really need it and it can mess up the goma cache entries.
- if (is_clang && !is_nacl && !(use_qt && use_libcxx)) {
- cflags += [ "-no-canonical-prefixes" ]
- }
}
config("clang_revision") {