[sr-dev] git:andrei/armv7: armv7: inform the assembler about thumb

Andrei Pelinescu-Onciul andrei at iptel.org
Tue Sep 20 20:06:19 CEST 2011


Module: sip-router
Branch: andrei/armv7
Commit: 5b0b840ae1c82573af8cc84abed4a30f136e3bf8
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5b0b840ae1c82573af8cc84abed4a30f136e3bf8

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Tue Sep 20 20:04:24 2011 +0200

armv7: inform the assembler about thumb

In some toolchains, the assembler defaults to arm and gcc does not
pass automatically the option for switching to the thumb mode, so
we have to do it by hand.

---

 Makefile.defs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile.defs b/Makefile.defs
index 5941e70..66b2975 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -1287,8 +1287,11 @@ ifeq	($(ARCH), arm7)
 		# if gcc 
 ifeq		($(CC_NAME), gcc)
 				C_DEFS+=-DCC_GCC_LIKE_ASM
-				#common stuff
+				#common stuff + inform the assembler about THUMB
+				# (some assemblers default to ARM, see
+				# https://wiki.ubuntu.com/ARM/Thumb2)
 				CFLAGS=-march=armv7-a -O9 -funroll-loops -fsigned-char \
+						-Wa,-mimplicit-it=thumb \
 						$(PROFILE)
 			#if gcc 4.5 or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))




More information about the sr-dev mailing list