From 2b03c4f2e42b2745d3ac26450e59cc674cfe3904 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 24 Jan 2012 19:18:57 +0000 Subject: config-default.mk: Explicitly pass -marm when we want to build ARM mode 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 --- config-default.mk | 4 ++-- 1 file 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 -- cgit v1.2.3