From 39e3271f270f75a4d65128f79be1dd3e455f5c85 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 11 Feb 2017 17:54:33 +0000
Subject: [PATCH 4/5] cmake/mips: Do not specify --target with OE

OE already specifies cross compiler correctly, adding this additional
--target confuses the clang driver and it resorts to invoke host assembler
when using -no-integrated-as

Fixes errors e.g.
|   Assembler messages:
|
|   Fatal error: invalid -march= option: `mips32r2'
|
|   clang-4.0: error: assembler command failed with exit code 1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 cmake/base-config-ix.cmake | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index b208f0852..2555b5e5b 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -169,11 +169,11 @@ macro(test_targets)
       # clang's default CPU's. In the 64-bit case, we must also specify the ABI
       # since the default ABI differs between gcc and clang.
       # FIXME: Ideally, we would build the N32 library too.
-      test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu")
-      test_target_arch(mips64el "" "-mips64r2" "--target=mips64el-linux-gnu" "-mabi=64")
+      test_target_arch(mipsel "" "-mips32r2")
+      test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
-      test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
-      test_target_arch(mips64 "" "-mips64r2" "--target=mips64-linux-gnu" "-mabi=64")
+      test_target_arch(mips "" "-mips32r2")
+      test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
       if(WIN32)
         test_target_arch(arm "" "" "")
-- 
2.16.1

