summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-02-11 18:00:14 +0000
committerKhem Raj <raj.khem@gmail.com>2017-02-11 18:00:14 +0000
commit9b3942e780969547600dac4834832db2c0461aca (patch)
tree17fa3deef6b48701cb7221664e166b75e42a6a4d
parenta96a442813d9990406cee5213db5e2b8b1a69bed (diff)
downloadmeta-clang-9b3942e780969547600dac4834832db2c0461aca.tar.gz
compiler-rt: Fix build with mips/mips64
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch44
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch b/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch
new file mode 100644
index 0000000..8e8852d
--- /dev/null
+++ b/recipes-devtools/clang/compiler-rt/0004-cmake-mips-Do-not-specify-target-with-OE.patch
@@ -0,0 +1,44 @@
1From 7a83bae70e155c499c9ed5b4719f8baf01da6cd9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 11 Feb 2017 17:54:33 +0000
4Subject: [PATCH] cmake/mips: Do not specify --target with OE
5
6OE already specifies cross compiler correctly, adding this additional
7--target confuses the clang driver and it resorts to invoke host assembler
8when using -no-integrated-as
9
10Fixes errors e.g.
11| Assembler messages:
12|
13| Fatal error: invalid -march= option: `mips32r2'
14|
15| clang-4.0: error: assembler command failed with exit code 1
16
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 cmake/base-config-ix.cmake | 8 ++++----
20 1 file changed, 4 insertions(+), 4 deletions(-)
21
22diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
23index 71d1499..c5aeecb 100644
24--- a/cmake/base-config-ix.cmake
25+++ b/cmake/base-config-ix.cmake
26@@ -161,11 +161,11 @@ macro(test_targets)
27 # clang's default CPU's. In the 64-bit case, we must also specify the ABI
28 # since the default ABI differs between gcc and clang.
29 # FIXME: Ideally, we would build the N32 library too.
30- test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu")
31- test_target_arch(mips64el "" "-mips64r2" "--target=mips64el-linux-gnu" "-mabi=64")
32+ test_target_arch(mipsel "" "-mips32r2")
33+ test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
34 elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
35- test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
36- test_target_arch(mips64 "" "-mips64r2" "--target=mips64-linux-gnu" "-mabi=64")
37+ test_target_arch(mips "" "-mips32r2")
38+ test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
39 elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
40 if(WIN32)
41 test_target_arch(arm "" "" "")
42--
431.9.1
44
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index 36171d4..5c4f187 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -20,6 +20,7 @@ SRC_URI = "${LLVM_GIT}/compiler-rt.git;protocol=${LLVM_GIT_PROTOCOL};branch=${B
20 file://0001-support-a-new-embedded-linux-target.patch \ 20 file://0001-support-a-new-embedded-linux-target.patch \
21 file://0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch \ 21 file://0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch \
22 file://0003-Disable-tsan-on-OE-glibc.patch \ 22 file://0003-Disable-tsan-on-OE-glibc.patch \
23 file://0004-cmake-mips-Do-not-specify-target-with-OE.patch \
23" 24"
24 25
25SRCREV_FORMAT = "compiler-rt" 26SRCREV_FORMAT = "compiler-rt"