From patchwork Mon Jan 24 18:36:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?V=C3=ADctor_Manuel_J=C3=A1quez_Leal?= X-Patchwork-Id: 80227 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 590931007D1 for ; Tue, 25 Jan 2011 05:46:55 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BCA2828085; Mon, 24 Jan 2011 19:46:51 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JJgmtfkypEgl; Mon, 24 Jan 2011 19:46:51 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E84028081; Mon, 24 Jan 2011 19:46:50 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 25AF428081 for ; Mon, 24 Jan 2011 19:46:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Izco4Hxa+1jI for ; Mon, 24 Jan 2011 19:46:46 +0100 (CET) X-Greylist: delayed 592 seconds by postgrey-1.27 at theia; Mon, 24 Jan 2011 19:46:44 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp4.mundo-r.com (smtp4.mundo-r.com [212.51.32.151]) by theia.denx.de (Postfix) with ESMTP id 0E03228080 for ; Mon, 24 Jan 2011 19:46:44 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtIFANZVPU1bdWOb/2dsb2JhbACEE5I4jxCrL5BEgSSDOHQEiyA X-IronPort-AV: E=Sophos;i="4.60,371,1291590000"; d="scan'208";a="323214805" Received: from 155.99.117.91.static.mundo-r.com (HELO fanzine.igalia.com) ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 24 Jan 2011 19:36:51 +0100 Received: from maestria.local.igalia.com ([192.168.10.14] helo=mail.igalia.com) by fanzine.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1PhRHX-00011O-Tc; Mon, 24 Jan 2011 19:36:51 +0100 Received: from ip148.dynamic.igalia.com ([192.168.10.148] helo=lit.local.igalia.com) by mail.igalia.com with esmtps (Cipher TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim) id 1PhRHX-0007Z0-PG; Mon, 24 Jan 2011 19:36:51 +0100 Received: from vjaquez by lit.local.igalia.com with local (Exim 4.72) (envelope-from ) id 1PhRHX-0003o7-3X; Mon, 24 Jan 2011 19:36:51 +0100 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= To: u-boot@lists.denx.de Date: Mon, 24 Jan 2011 19:36:48 +0100 Message-Id: <1295894210-14541-1-git-send-email-vjaquez@igalia.com> X-Mailer: git-send-email 1.7.0.2 MIME-Version: 1.0 Cc: Steve Sakoman Subject: [U-Boot] [RFC] fix break caused by new binutils X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de According with this discussion [1] the new assemblers need -march=armv7-a+sec on command line or .arch_extension sec inline to enable use of the smc instruction. In the sakoman's u-boot repository there is branch for the omap4 [2] which uses the smc instruction with the -march=armv7-a, and it will not compile with the latest binutils (2.21) This patch fix that problem adding conditionally the armv7-a+sec the march. In order to do this the patch adds as-instr which checks the latter to enable the correct -march in AFLAGS for files that use smc. This patch must be applied on top of git://www.sakoman.com/git/u-boot.git;branch=omap4-exp 1. https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/669912 2. http://www.sakoman.com/cgi-bin/gitweb.cgi?p=u-boot.git;a=shortlog;h=refs/heads/omap4-exp Signed-off-by: Víctor Manuel Jáquez Leal --- arch/arm/cpu/armv7/omap4/Makefile | 2 ++ config.mk | 9 +++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/omap4/Makefile b/arch/arm/cpu/armv7/omap4/Makefile index 987dc9d..9dc2b64 100644 --- a/arch/arm/cpu/armv7/omap4/Makefile +++ b/arch/arm/cpu/armv7/omap4/Makefile @@ -26,6 +26,8 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o SOBJS += lowlevel_init.o +plus_sec := $(call as-instr,.arch_extension sec,+sec) +lowlevel_init.o: AFLAGS += -Wa,-march=armv7-a$(plus_sec) COBJS += board.o COBJS += mem.o diff --git a/config.mk b/config.mk index c6d6f7b..8d86860 100644 --- a/config.mk +++ b/config.mk @@ -266,3 +266,12 @@ cmd_link_o_target = $(if $(strip $1),\ rm -f $@; $(AR) rcs $@ ) ######################################################################### + +# Tries to compile an assembly instruction +as-instr = $(shell if echo -e "$(1)" | \ + $(CC) $(AFLAGS) -c -xassembler - \ + -o $(TMPOUT)astest$$$$.out > /dev/null 2>&1; \ + then rm $(TMPOUT)astest$$$$.out; echo "$(2)"; \ + else echo "$(3)"; fi) + +#########################################################################