U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Sakoman <steve@sakoman.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] fix break caused by new binutils
Date: Mon, 24 Jan 2011 10:56:08 -0800	[thread overview]
Message-ID: <1295895368.1999.14.camel@quadra> (raw)
In-Reply-To: <1295894210-14541-1-git-send-email-vjaquez@igalia.com>

On Mon, 2011-01-24 at 19:36 +0100, V?ctor Manuel J?quez Leal wrote:
> 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)

Just to clarify -- my branch has Aneesh's "armv7: adapt omap4 to the new
cache maintenance framework" patch series in it.

So this issue will arise only when Aneesh's patch series is applied.

Perhaps this fix could be incorporated into Aneesh's next revision??

Steve

> 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 <vjaquez@igalia.com>
> ---
>  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)
> +
> +#########################################################################

  reply	other threads:[~2011-01-24 18:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-24 18:36 [U-Boot] [RFC] fix break caused by new binutils Víctor Manuel Jáquez Leal
2011-01-24 18:56 ` Steve Sakoman [this message]
2011-01-24 19:14   ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295895368.1999.14.camel@quadra \
    --to=steve@sakoman.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox