From patchwork Tue Jan 24 19:18:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 6379 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 728CB23E0E for ; Tue, 24 Jan 2012 19:19:03 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 5B48EA1802E for ; Tue, 24 Jan 2012 19:19:03 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id r19so4464979bka.11 for ; Tue, 24 Jan 2012 11:19:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.130.12 with SMTP id hk12mr5521901bkc.56.1327432742371; Tue, 24 Jan 2012 11:19:02 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.204.130.220 with SMTP id u28cs112894bks; Tue, 24 Jan 2012 11:19:02 -0800 (PST) Received: by 10.204.129.208 with SMTP id p16mr5620207bks.131.1327432741598; Tue, 24 Jan 2012 11:19:01 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id fo9si8938405bkc.107.2012.01.24.11.19.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jan 2012 11:19:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1RpltS-00013P-Rg; Tue, 24 Jan 2012 19:18:58 +0000 From: Peter Maydell To: android-virt@lists.cs.columbia.edu Cc: patches@linaro.org, Zygmunt Krynicki Subject: [PATCH 1/2] config-default.mk: Explicitly pass -marm when we want to build ARM mode Date: Tue, 24 Jan 2012 19:18:57 +0000 Message-Id: <1327432738-4026-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1327432738-4026-1-git-send-email-peter.maydell@linaro.org> References: <1327432738-4026-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQmyCiO6CzllmAtPPh0ff7FsWiuVAyfJs9Nmz8fF7oC4CI+CNo4BRoYvIpULT4YVI3qXhXm2 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 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