From patchwork Wed Aug 8 21:27:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1297901 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 32BE53FCFC for ; Wed, 8 Aug 2012 21:32:32 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SzDou-0000Ts-E9; Wed, 08 Aug 2012 21:29:36 +0000 Received: from moutng.kundenserver.de ([212.227.126.187]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SzDnh-00006Z-B1 for linux-arm-kernel@lists.infradead.org; Wed, 08 Aug 2012 21:28:22 +0000 Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Mh8wH-1TLPLv0WJt-00M5GO; Wed, 08 Aug 2012 23:28:10 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/10] ARM: pass -marm to gcc by default Date: Wed, 8 Aug 2012 23:27:52 +0200 Message-Id: <1344461278-28245-5-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1344461278-28245-1-git-send-email-arnd@arndb.de> References: <1344461278-28245-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:nd8XuSNg3c4SZ09Jhb7+/zeFJBVPUv9+oP3u/DhLaAF u3bRnZAri28uO5kLBSI3z37nC81oIiGUaedz1bpZjJdEHF2Y8A l3yljfBSO31hI2xPRN/QjsDOE9UiJM2xwiFcYqUAwnL9qQY/XY CWAhrv81bM7+xm854i2gHSI+kZOfKpheDaY14OrBDTYDRMJ6MV 7GKIB/9ZS/KP0wh92SHE0sfsQlI/TKNYmUP92WwG/yjyI5VDKA Vltji8f/AB/lO39ZFzv5xNc07EjmfdBLtrDW4QDA9X7DUCbYk0 ezsuVRK2qyxvBah1TVYXLx20l5PFfXrhsJuLo2ohXDmTfduYlH vC+9Sb1Q/CvHhj68I0VhbJNua9B3CahDFugDOrQL6MdLGRH0em 59wqKKGItwWLA== X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.187 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Russell King , Dave Martin , arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The Linaro cross toolchain and probably others nowadays default to building in THUMB2 mode. When building a kernel for a CPU that does not support THUMB2, the compiler complains about incorrect flags. We can work around this by setting -marm for all non-T2 builds. Without this patch, building assabet_defconfig results in: usr/initramfs_data.S:1:0: warning: target CPU does not support THUMB instructions [enabled by default] arch/arm/nwfpe/entry.S:1:0: warning: target CPU does not support THUMB instructions [enabled by default] firmware/cis/PCMLM28.cis.gen.S:1:0: warning: target CPU does not support THUMB instructions [enabled by default] (and many more) Signed-off-by: Arnd Bergmann Cc: Russell King Cc: Dave Martin --- arch/arm/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 30eae87..b4c2296 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -111,6 +111,9 @@ AFLAGS_THUMB2 :=$(CFLAGS_THUMB2) -Wa$(comma)-mthumb ifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) CFLAGS_MODULE +=-fno-optimize-sibling-calls endif +else +CFLAGS_THUMB2 :=-marm +AFLAGS_THUMB2 :=-marm endif # Need -Uarm for gcc < 3.x