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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 at linaro.org>
---
 config-default.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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
 
-- 
1.7.5.4



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux