summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-07-20 12:52:22 -0700
committerKhem Raj <raj.khem@gmail.com>2017-07-20 12:52:22 -0700
commite688e5f2061b2587fd2d0f3b44ea3cd0549e2a25 (patch)
tree7b15c98463fd0ad19d078576bf9d8c75616b06d5 /recipes-devtools
parent6224e4377e68533d42382ed3b3ba8b3226a8803e (diff)
downloadmeta-clang-e688e5f2061b2587fd2d0f3b44ea3cd0549e2a25.tar.gz
compiler-rt: Fix build on aarch64
Pass armv8.1-a for march when using crc instruction Fix #38 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch38
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch b/recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch
new file mode 100644
index 0000000..9f1ef38
--- /dev/null
+++ b/recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch
@@ -0,0 +1,38 @@
1From ce33b77707e708348311aea2a9b2401ed4685aa2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 20 Jul 2017 12:14:03 -0700
4Subject: [PATCH 5/5] Pass -march=armv8.1-a instead of -mcrc
5
6When we pass -mcrc it does not cause driver to
7pass right options to assembler, especially when
8using GNU assembler, is used this causes assembler
9failures to recognise crc instructions since the
10default -march option passed it armv8-a
11
12/tmp/scudo_crc32-9e9612.s:14: Error: selected processor does not support `crc32cx w0,w0,x1'
13
14Adding -march=armv8.1-a forces the driver to pass
15-march=armv8.1-a to assembler as well, which fixes
16this issue
17
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 lib/scudo/CMakeLists.txt | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/lib/scudo/CMakeLists.txt b/lib/scudo/CMakeLists.txt
24index 14c199fa8..857bdccd3 100644
25--- a/lib/scudo/CMakeLists.txt
26+++ b/lib/scudo/CMakeLists.txt
27@@ -26,7 +26,7 @@ endif()
28 # Enable the AArch64 CRC32 feature for scudo_crc32.cpp, if available.
29 # Note that it is enabled by default starting with armv8.1-a.
30 if (COMPILER_RT_HAS_MCRC_FLAG)
31- set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -mcrc)
32+ set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -march=armv8.1-a)
33 endif()
34
35 if(COMPILER_RT_HAS_SCUDO)
36--
372.13.3
38
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index 7f9d5db..3be2fe8 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -20,6 +20,7 @@ SRC_URI = "\
20 file://0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch \ 20 file://0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch \
21 file://0003-Disable-tsan-on-OE-glibc.patch \ 21 file://0003-Disable-tsan-on-OE-glibc.patch \
22 file://0004-cmake-mips-Do-not-specify-target-with-OE.patch \ 22 file://0004-cmake-mips-Do-not-specify-target-with-OE.patch \
23 file://0005-Pass-march-armv8.1-a-instead-of-mcrc.patch \
23" 24"
24 25
25SRCREV_FORMAT = "compiler-rt" 26SRCREV_FORMAT = "compiler-rt"