summaryrefslogtreecommitdiffstats
path: root/import-layers/meta-openembedded/meta-oe/recipes-support/ne10/ne10/0001-CMakeLists.txt-Remove-mthumb-interwork.patch
blob: 9f2faaa52954fd3b0ebe15b5bfbc910659d5404a (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
38
39
40
41
42
43
44
From 8a0d1cbfcc0649b2696c9cf20f877366de259ce3 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 12 Nov 2016 18:15:26 +0000
Subject: [PATCH] CMakeLists.txt: Remove -mthumb-interwork

This option is meaningless with aapcs ABI
which is the default for Linux and android
for armv7+ architectures

As an aside it helps in compiling with clang
where this option is absent

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 784a5a8..68da920 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,7 @@ if(ANDROID_PLATFORM)
 
     # Adding cflags for armv7. Aarch64 does not need such flags.
     if(${NE10_TARGET_ARCH} STREQUAL "armv7")
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=${FLOAT_ABI} -mfpu=vfp3")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb -march=armv7-a -mfloat-abi=${FLOAT_ABI} -mfpu=vfp3")
         if(NE10_ARM_HARD_FLOAT)
             # "--no-warn-mismatch" is needed for linker to suppress linker error about not all functions use VFP register to pass argument, eg.
             #   .../arm-linux-androideabi/bin/ld: error: ..../test-float.o
@@ -138,8 +138,8 @@ if(ANDROID_PLATFORM)
     ${CMAKE_C_FLAGS}")
 elseif(GNULINUX_PLATFORM)
     if("${NE10_TARGET_ARCH}" STREQUAL "armv7")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3 -funsafe-math-optimizations")
-      set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb -march=armv7-a -mfpu=vfp3 -funsafe-math-optimizations")
+      set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -mthumb -march=armv7-a -mfpu=neon")
       # Turn on asm optimization for Linux on ARM v7.
       set(NE10_ASM_OPTIMIZATION on)
     endif()
-- 
1.8.3.1

OpenPOWER on IntegriCloud