From patchwork Wed Sep 7 15:59:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 3962 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 A500A23FA0 for ; Wed, 7 Sep 2011 15:59:35 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 997FFA184A1 for ; Wed, 7 Sep 2011 15:59:35 +0000 (UTC) Received: by mail-fx0-f52.google.com with SMTP id 18so958886fxd.11 for ; Wed, 07 Sep 2011 08:59:35 -0700 (PDT) Received: by 10.223.22.14 with SMTP id l14mr718881fab.100.1315411175515; Wed, 07 Sep 2011 08:59:35 -0700 (PDT) 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.152.11.8 with SMTP id m8cs144814lab; Wed, 7 Sep 2011 08:59:35 -0700 (PDT) Received: by 10.213.32.11 with SMTP id a11mr1474000ebd.52.1315411174316; Wed, 07 Sep 2011 08:59:34 -0700 (PDT) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id y7si805935weq.38.2011.09.07.08.59.34 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 07 Sep 2011 08:59:34 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by mail-ww0-f50.google.com with SMTP id 36so7759916wwi.31 for ; Wed, 07 Sep 2011 08:59:34 -0700 (PDT) Received: by 10.216.28.148 with SMTP id g20mr510656wea.100.1315411174022; Wed, 07 Sep 2011 08:59:34 -0700 (PDT) Received: from e103592.peterhouse.linaro.org (fw-lnat.cambridge.arm.com [217.140.96.63]) by mx.google.com with ESMTPS id fo14sm903031wbb.19.2011.09.07.08.59.32 (version=SSLv3 cipher=OTHER); Wed, 07 Sep 2011 08:59:33 -0700 (PDT) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Haojian Zhuang , Eric Miao Subject: [RFC PATCH 1/3] ARM: iwmmxt: Fix Makefile rules for building iwmmxt for Thumb-2 Date: Wed, 7 Sep 2011 16:59:16 +0100 Message-Id: <1315411158-17479-2-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1315411158-17479-1-git-send-email-dave.martin@linaro.org> References: <1315411158-17479-1-git-send-email-dave.martin@linaro.org> Because gcc/gas have no sane way to turn on individual CPU extensions from the command-line, iwmmxt.S was previously built with -mcpu=iwmmxt. Unfortunately, this also downgrades the CPU to v5, with the result that this file fails to build for a Thumb-2 kernel. New versions of the tools support -march=+iwmmxt, and it seems reasonable to require up-to-date tools when building in Thumb-2. So, this patch uses -march=armv7-a+iwmmxt for CONFIG_THUMB2_KERNEL=y. Signed-off-by: Dave Martin --- arch/arm/kernel/Makefile | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index f7887dc..8a58339 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -65,7 +65,14 @@ obj-$(CONFIG_CPU_PJ4) += pj4-cp0.o obj-$(CONFIG_IWMMXT) += iwmmxt.o obj-$(CONFIG_CPU_HAS_PMU) += pmu.o obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o + +# When enough people have binutils which support -march=...+iwmmxt, this +# should change to something like if __LINUX_ARM_ARCH__ < 7. +ifdef CONFIG_THUMB2_KERNEL +AFLAGS_iwmmxt.o := -Wa,-march=armv7-a+iwmmxt +else AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt +endif ifneq ($(CONFIG_ARCH_EBSA110),y) obj-y += io.o