Upstream-Status: Inappropriate [OE-Specific]

Signed-off-by: Maksim Sisov <msisov@igalia.com>
---
From 95f567249a376b49ad98371d66046da8a35da787 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 29 Apr 2019 12:00:19 +0300
Subject: [PATCH] Remove the GN settings done for clang that conflict with OE

clang cross compiler that is build with meta-clang has lot of these
settings built-in and specifying them here confuses the compiler

--target option and -no-canonical-prefixes options result in clang

finding the headers in target sysroot

Upstream-Status: Inappropriate [OE-Specific]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Rebased-by: Maksim Sisov <msisov@igalia.com>
---

 build/config/compiler/BUILD.gn | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 01d97a3605ff..0092e81c3cf0 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -721,10 +721,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 += [
           "-march=$arm_arch",
@@ -734,11 +730,6 @@ config("compiler_cpu_abi") {
       if (arm_tune != "") {
         cflags += [ "-mtune=$arm_tune" ]
       }
-    } 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" ]
       if (custom_toolchain == "") {
@@ -746,9 +737,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" ]
@@ -828,8 +816,6 @@ config("compiler_cpu_abi") {
       ldflags += [ "-Wl,--hash-style=sysv" ]
       if (custom_toolchain == "") {
         if (is_clang) {
-          cflags += [ "--target=mips-linux-gnu" ]
-          ldflags += [ "--target=mips-linux-gnu" ]
         } else {
           cflags += [ "-EB" ]
           ldflags += [ "-EB" ]
@@ -877,9 +863,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 += [
@@ -937,8 +920,6 @@ config("compiler_cpu_abi") {
       ldflags += [ "-Wl,--hash-style=sysv" ]
       if (custom_toolchain == "") {
         if (is_clang) {
-          cflags += [ "--target=mips64-linux-gnuabi64" ]
-          ldflags += [ "--target=mips64-linux-gnuabi64" ]
         } else {
           cflags += [
             "-EB",
@@ -1103,13 +1084,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) {
-    cflags += [ "-no-canonical-prefixes" ]
-  }
 }

 config("clang_revision") {
-- 
2.20.1
