1From 8a0d1cbfcc0649b2696c9cf20f877366de259ce3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Nov 2016 18:15:26 +0000
4Subject: [PATCH] CMakeLists.txt: Remove -mthumb-interwork
5
6This option is meaningless with aapcs ABI
7which is the default for Linux and android
8for armv7+ architectures
9
10As an aside it helps in compiling with clang
11where this option is absent
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 CMakeLists.txt | 6 +++---
16 1 file changed, 3 insertions(+), 3 deletions(-)
17
18diff --git a/CMakeLists.txt b/CMakeLists.txt
19index 784a5a8..68da920 100644
20--- a/CMakeLists.txt
21+++ b/CMakeLists.txt
22@@ -117,7 +117,7 @@ if(ANDROID_PLATFORM)
23
24     # Adding cflags for armv7. Aarch64 does not need such flags.
25     if(${NE10_TARGET_ARCH} STREQUAL "armv7")
26-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=${FLOAT_ABI} -mfpu=vfp3")
27+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb -march=armv7-a -mfloat-abi=${FLOAT_ABI} -mfpu=vfp3")
28         if(NE10_ARM_HARD_FLOAT)
29             # "--no-warn-mismatch" is needed for linker to suppress linker error about not all functions use VFP register to pass argument, eg.
30             #   .../arm-linux-androideabi/bin/ld: error: ..../test-float.o
31@@ -138,8 +138,8 @@ if(ANDROID_PLATFORM)
32     ${CMAKE_C_FLAGS}")
33 elseif(GNULINUX_PLATFORM)
34     if("${NE10_TARGET_ARCH}" STREQUAL "armv7")
35-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3 -funsafe-math-optimizations")
36-      set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
37+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb -march=armv7-a -mfpu=vfp3 -funsafe-math-optimizations")
38+      set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -mthumb -march=armv7-a -mfpu=neon")
39       # Turn on asm optimization for Linux on ARM v7.
40       set(NE10_ASM_OPTIMIZATION on)
41     endif()
42--
431.8.3.1
44
45