From e688e5f2061b2587fd2d0f3b44ea3cd0549e2a25 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 20 Jul 2017 12:52:22 -0700 Subject: compiler-rt: Fix build on aarch64 Pass armv8.1-a for march when using crc instruction Fix #38 Signed-off-by: Khem Raj --- ...0005-Pass-march-armv8.1-a-instead-of-mcrc.patch | 38 ++++++++++++++++++++++ recipes-devtools/clang/compiler-rt_git.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 recipes-devtools/clang/compiler-rt/0005-Pass-march-armv8.1-a-instead-of-mcrc.patch (limited to 'recipes-devtools') 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 @@ +From ce33b77707e708348311aea2a9b2401ed4685aa2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 20 Jul 2017 12:14:03 -0700 +Subject: [PATCH 5/5] Pass -march=armv8.1-a instead of -mcrc + +When we pass -mcrc it does not cause driver to +pass right options to assembler, especially when +using GNU assembler, is used this causes assembler +failures to recognise crc instructions since the +default -march option passed it armv8-a + +/tmp/scudo_crc32-9e9612.s:14: Error: selected processor does not support `crc32cx w0,w0,x1' + +Adding -march=armv8.1-a forces the driver to pass +-march=armv8.1-a to assembler as well, which fixes +this issue + +Signed-off-by: Khem Raj +--- + lib/scudo/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/scudo/CMakeLists.txt b/lib/scudo/CMakeLists.txt +index 14c199fa8..857bdccd3 100644 +--- a/lib/scudo/CMakeLists.txt ++++ b/lib/scudo/CMakeLists.txt +@@ -26,7 +26,7 @@ endif() + # Enable the AArch64 CRC32 feature for scudo_crc32.cpp, if available. + # Note that it is enabled by default starting with armv8.1-a. + if (COMPILER_RT_HAS_MCRC_FLAG) +- set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -mcrc) ++ set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -march=armv8.1-a) + endif() + + if(COMPILER_RT_HAS_SCUDO) +-- +2.13.3 + 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 = "\ file://0002-Simplify-cross-compilation.-Don-t-use-native-compile.patch \ file://0003-Disable-tsan-on-OE-glibc.patch \ file://0004-cmake-mips-Do-not-specify-target-with-OE.patch \ + file://0005-Pass-march-armv8.1-a-instead-of-mcrc.patch \ " SRCREV_FORMAT = "compiler-rt" -- cgit v1.2.3-54-g00ecf