blob: e6628f5fd2552f82088e66f87cb00cfa1a9f19e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
From ce33b77707e708348311aea2a9b2401ed4685aa2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
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 <raj.khem@gmail.com>
---
lib/scudo/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: git/lib/scudo/CMakeLists.txt
===================================================================
--- git.orig/lib/scudo/CMakeLists.txt
+++ git/lib/scudo/CMakeLists.txt
@@ -26,7 +26,9 @@ 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)
+ if ("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64")
+ set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -march=armv8.1-a)
+ endif()
endif()
if(COMPILER_RT_HAS_SCUDO)
|