1From 7eb6877c15ab9d73c9a7cf3a8a17a1a23f7396f9 Mon Sep 17 00:00:00 2001 2From: Khem Raj <raj.khem@gmail.com> 3Date: Mon, 29 Apr 2019 12:00:19 +0300 4Subject: [PATCH] Remove the GN settings done for clang that conflict with OE 5 6clang cross compiler that is build with meta-clang has lot of these 7settings built-in and specifying them here confuses the compiler 8 9--target option and -no-canonical-prefixes options result in clang 10 11finding the headers in target sysroot 12 13Upstream-Status: Inappropriate [OE-Specific] 14 15Signed-off-by: Khem Raj <raj.khem@gmail.com> 16Rebased-by: Maksim Sisov <msisov@igalia.com> 17Rebased-by: Randy MacLeod <randy.macleod@windriver.com> 18 19--- 20 build/config/compiler/BUILD.gn | 38 ---------------------------------- 21 1 file changed, 38 deletions(-) 22 23diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn 24index a704f0f485e4e..4f4ebdfd80f97 100644 25--- a/build/config/compiler/BUILD.gn 26+++ b/build/config/compiler/BUILD.gn 27@@ -1001,11 +1001,6 @@ config("compiler_cpu_abi") { 28 ] 29 } 30 } else if (current_cpu == "arm") { 31- if (is_clang && !is_android && !is_nacl && 32- !(is_chromeos_lacros && is_chromeos_device)) { 33- cflags += [ "--target=arm-linux-gnueabihf" ] 34- ldflags += [ "--target=arm-linux-gnueabihf" ] 35- } 36 if (!is_nacl) { 37 cflags += [ 38 "-march=$arm_arch", 39@@ -1015,12 +1010,6 @@ config("compiler_cpu_abi") { 40 if (arm_tune != "") { 41 cflags += [ "-mtune=$arm_tune" ] 42 } 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" ] 48- } 49 } else if (current_cpu == "mipsel" && !is_nacl) { 50 ldflags += [ "-Wl,--hash-style=sysv" ] 51 if (custom_toolchain == "") { 52@@ -1028,9 +1017,6 @@ config("compiler_cpu_abi") { 53 if (is_android) { 54 cflags += [ "--target=mipsel-linux-android" ] 55 ldflags += [ "--target=mipsel-linux-android" ] 56- } else { 57- cflags += [ "--target=mipsel-linux-gnu" ] 58- ldflags += [ "--target=mipsel-linux-gnu" ] 59 } 60 } else { 61 cflags += [ "-EL" ] 62@@ -1110,8 +1096,6 @@ config("compiler_cpu_abi") { 63 ldflags += [ "-Wl,--hash-style=sysv" ] 64 if (custom_toolchain == "") { 65 if (is_clang) { 66- cflags += [ "--target=mips-linux-gnu" ] 67- ldflags += [ "--target=mips-linux-gnu" ] 68 } else { 69 cflags += [ "-EB" ] 70 ldflags += [ "-EB" ] 71@@ -1159,9 +1143,6 @@ config("compiler_cpu_abi") { 72 if (is_android) { 73 cflags += [ "--target=mips64el-linux-android" ] 74 ldflags += [ "--target=mips64el-linux-android" ] 75- } else { 76- cflags += [ "--target=mips64el-linux-gnuabi64" ] 77- ldflags += [ "--target=mips64el-linux-gnuabi64" ] 78 } 79 } else { 80 cflags += [ 81@@ -1219,8 +1200,6 @@ config("compiler_cpu_abi") { 82 ldflags += [ "-Wl,--hash-style=sysv" ] 83 if (custom_toolchain == "") { 84 if (is_clang) { 85- cflags += [ "--target=mips64-linux-gnuabi64" ] 86- ldflags += [ "--target=mips64-linux-gnuabi64" ] 87 } else { 88 cflags += [ 89 "-EB", 90@@ -1382,23 +1361,6 @@ config("compiler_deterministic") { 91 } 92 } 93 } 94- 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" ] 100- 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. 107- if (!is_win) { 108- ldflags += [ "-no-canonical-prefixes" ] 109- } 110- } 111 } 112 113 config("clang_revision") { 114