diff mbox

[1/2] config-default.mk: Explicitly pass -marm when we want to build ARM mode

Message ID 1327432738-4026-2-git-send-email-peter.maydell@linaro.org
State Accepted
Headers show

Commit Message

Peter Maydell Jan. 24, 2012, 7:18 p.m. UTC
Explicitly pass -marm in the CFLAGS when we want to build in ARM mode,
because some compilers will default to Thumb. This has not previously been
a problem in practice because the assembler will compile in ARM mode
anyway unless we told it to use Thumb mode with -Wa,-mthumb. However it
does mean that we end up building boot.S with a cpp that thinks it is
compiling for Thumb (and thus defines __thumb__) but an assembler that
generates ARM code. Passing -marm explicitly avoids this mismatch and
allows us to use the cpp preprocessor defines without fear.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 config-default.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/config-default.mk b/config-default.mk
index 0d5bb85..6c73934 100644
--- a/config-default.mk
+++ b/config-default.mk
@@ -63,7 +63,7 @@  endif # SYSTEM = mps
 ifeq ($(SYSTEM),realview_eb)
 
 #CPPFLAGS	+= -DSMP
-CPPFLAGS	+= -march=armv7-a
+CPPFLAGS	+= -march=armv7-a -marm
 #CPPFLAGS	+= -DTHUMB2_KERNEL
 
 # Default kernel command line, using initrd:
@@ -84,7 +84,7 @@  endif # SYSTEM = realvire_eb
 ifeq ($(SYSTEM),vexpress)
 
 CPPFLAGS	+= -DSMP
-CPPFLAGS	+= -march=armv7-a
+CPPFLAGS	+= -march=armv7-a -marm
 #CPPFLAGS	+= -DTHUMB2_KERNEL
 CPPFLAGS	+= -DVEXPRESS