summaryrefslogtreecommitdiffstats
path: root/external/meta-clang/recipes-devtools/clang/clang/0004-compiler-rt-cmake-mips-Do-not-specify-target-with-OE.patch
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 14:58:56 +0900
commit4204309872da5cb401cbb2729d9e2d4869a87f42 (patch)
treec7415e8600205e40ff7e91e8e5f4c411f30329f2 /external/meta-clang/recipes-devtools/clang/clang/0004-compiler-rt-cmake-mips-Do-not-specify-target-with-OE.patch
parent5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (diff)
Diffstat (limited to 'external/meta-clang/recipes-devtools/clang/clang/0004-compiler-rt-cmake-mips-Do-not-specify-target-with-OE.patch')
-rw-r--r--external/meta-clang/recipes-devtools/clang/clang/0004-compiler-rt-cmake-mips-Do-not-specify-target-with-OE.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/external/meta-clang/recipes-devtools/clang/clang/0004-compiler-rt-cmake-mips-Do-not-specify-target-with-OE.patch b/external/meta-clang/recipes-devtools/clang/clang/0004-compiler-rt-cmake-mips-Do-not-specify-target-with-OE.patch
new file mode 100644
index 00000000..0356e2a6
--- /dev/null
+++ b/external/meta-clang/recipes-devtools/clang/clang/0004-compiler-rt-cmake-mips-Do-not-specify-target-with-OE.patch
@@ -0,0 +1,44 @@
+From b29deaeb42a8f56bb5dd72b5a8c3e2c755a6bb9e 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/4] compiler-rt: 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 91fe2494b..789b80628 100644
+--- a/cmake/base-config-ix.cmake
++++ b/cmake/base-config-ix.cmake
+@@ -191,11 +191,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.20.1
+