Ver Fonte

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.
Andrei Pelinescu-Onciul há 14 anos atrás
pai
commit
5b0b840ae1
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      Makefile.defs

+ 4 - 1
Makefile.defs

@@ -1287,8 +1287,11 @@ ifeq	($(ARCH), arm7)
 		# if gcc 
 		# if gcc 
 ifeq		($(CC_NAME), gcc)
 ifeq		($(CC_NAME), gcc)
 				C_DEFS+=-DCC_GCC_LIKE_ASM
 				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 \
 				CFLAGS=-march=armv7-a -O9 -funroll-loops -fsigned-char \
+						-Wa,-mimplicit-it=thumb \
 						$(PROFILE)
 						$(PROFILE)
 			#if gcc 4.5 or 4.2+
 			#if gcc 4.5 or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))
 ifeq (,$(strip $(filter-out 4.2+ 4.5,$(CC_SHORTVER))))