mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: fix GCC 11.x build failures for ARMv7
Date: Tue, 12 Apr 2022 09:53:20 +0200	[thread overview]
Message-ID: <20220412075320.GU4012@pengutronix.de> (raw)
In-Reply-To: <20220408170154.114526-1-abbotti@mev.co.uk>

On Fri, Apr 08, 2022 at 06:01:54PM +0100, Ian Abbott wrote:
> Building barebox for ARMv7 with GCC 11.x results in errors similar to
> the following:
> 
>   CC      common/state/state_variables.o
> {standard input}: Assembler messages:
> {standard input}:1535: Error: selected processor does not support `rev r3,r3' in Thumb mode
> {standard input}:1576: Error: selected processor does not support `rev r3,r3' in Thumb mode
> 
> Or:
> 
>   CC      common/state/state_variables.o
> {standard input}: Assembler messages:
> {standard input}:1405: Error: selected processor does not support `rev r3,r3' in ARM mode
> {standard input}:1453: Error: selected processor does not support `rev r3,r3' in ARM mode
> 
> The problem is that the compiler option `-march=armv7-a` is not being
> chosen by "arch/arm/Makefile", but rather the fallback options
> `-march=armv5t -Wa,-march=armv7-a` are being chosen.
> 
> Appending `-msoft-float` to `KBUILD_CPPFLAGS` earlier in
> "arch/arm/Makefile" before the tests for supported `-march` options
> seems to fix the problem.
> 
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
>  arch/arm/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 610ded8a12..124a3fc40c 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -8,6 +8,7 @@ ifeq ($(CONFIG_CPU_V8),y)
>  KBUILD_CPPFLAGS	+=$(call cc-option,-maarch64,)
>  else
>  KBUILD_CPPFLAGS	+=$(call cc-option,-marm,)
> +KBUILD_CPPFLAGS	+= -msoft-float
>  endif
>  
>  ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
> @@ -78,7 +79,7 @@ KBUILD_CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y)
>  KBUILD_AFLAGS   += -include asm/unified.h
>  export S64 = _64
>  else
> -KBUILD_CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float $(CFLAGS_THUMB2)
> +KBUILD_CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) $(CFLAGS_THUMB2)
>  KBUILD_AFLAGS   += -include asm/unified.h -msoft-float $(AFLAGS_THUMB2)
>  endif
>  
> -- 
> 2.35.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      reply	other threads:[~2022-04-12  8:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08 17:01 Ian Abbott
2022-04-12  7:53 ` Sascha Hauer [this message]

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=20220412075320.GU4012@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=abbotti@mev.co.uk \
    --cc=barebox@lists.infradead.org \
    /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