1*4882a593SmuzhiyunFrom 034a3552e9700c6d424bd706db106f5bce1f5a5e Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 3*4882a593SmuzhiyunDate: Fri, 11 Nov 2016 21:49:39 +0100 4*4882a593SmuzhiyunSubject: [PATCH] arm: fix build on Thumb-only architectures 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunBuilding tinymembench for ARM Cortex-M currently fails, because the 7*4882a593Smuzhiyunarm-neon.S file contains ARM code that doesn't build on Thumb-only 8*4882a593Smuzhiyunarchitectures. To account for this and fix the build for Cortex-M, 9*4882a593Smuzhiyunthis patch adjusts the compile time condition to also verify that the 10*4882a593Smuzhiyunarchitecture supports the ARM instruction set, by testing the 11*4882a593Smuzhiyun__ARM_ARCH_ISA_ARM compiler define. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 14*4882a593Smuzhiyun--- 15*4882a593Smuzhiyun arm-neon.S | 2 +- 16*4882a593Smuzhiyun asm-opt.c | 2 +- 17*4882a593Smuzhiyun 2 files changed, 2 insertions(+), 2 deletions(-) 18*4882a593Smuzhiyun 19*4882a593Smuzhiyundiff --git a/arm-neon.S b/arm-neon.S 20*4882a593Smuzhiyunindex 4db78ce..19c30ad 100644 21*4882a593Smuzhiyun--- a/arm-neon.S 22*4882a593Smuzhiyun+++ b/arm-neon.S 23*4882a593Smuzhiyun@@ -21,7 +21,7 @@ 24*4882a593Smuzhiyun * DEALINGS IN THE SOFTWARE. 25*4882a593Smuzhiyun */ 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun-#ifdef __arm__ 28*4882a593Smuzhiyun+#if defined(__arm__) && defined(__ARM_ARCH_ISA_ARM) 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun .text 31*4882a593Smuzhiyun .fpu neon 32*4882a593Smuzhiyundiff --git a/asm-opt.c b/asm-opt.c 33*4882a593Smuzhiyunindex 9da4596..eba1183 100644 34*4882a593Smuzhiyun--- a/asm-opt.c 35*4882a593Smuzhiyun+++ b/asm-opt.c 36*4882a593Smuzhiyun@@ -202,7 +202,7 @@ bench_info *get_asm_framebuffer_benchmarks(void) 37*4882a593Smuzhiyun return empty; 38*4882a593Smuzhiyun } 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun-#elif defined(__arm__) 41*4882a593Smuzhiyun+#elif defined(__arm__) && defined(__ARM_ARCH_ISA_ARM) 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun #include "arm-neon.h" 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun-- 46*4882a593Smuzhiyun2.7.4 47*4882a593Smuzhiyun 48