public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: B.R. Oake <broake@openmailbox.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] Some ARM builds fail due to float ABI mismatch
Date: Sun, 04 Jan 2015 02:04:22 +0000	[thread overview]
Message-ID: <54A89FA6.8050105@openmailbox.org> (raw)

Hello,

If I build U-Boot natively on an A20-Olinuxino-Micro (sunxi) running
Debian Jessie armhf, and the code includes certain operations such as
division of a long long, I get this error:

$ make
[...]
  LDS     u-boot.lds
  LD      u-boot
ld.bfd: error: /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(bpabi.o) uses VFP register arguments, u-boot does not
ld.bfd: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(bpabi.o)
ld.bfd: error: /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(_divdi3.o) uses VFP register arguments, u-boot does not
ld.bfd: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(_divdi3.o)
ld.bfd: error: /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(_udivdi3.o) uses VFP register arguments, u-boot does not
ld.bfd: failed to merge target specific data of file /usr/lib/gcc/arm-linux-gnueabihf/4.9/libgcc.a(_udivdi3.o)
Makefile:1075: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1
$

I think this is because U-Boot has been built with the soft-float ABI,
whereas my system only has a hard-float library.  The relevant build
option is set in arch/arm/config.mk:

PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \
      $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

The build works once I've removed the -msoft-float option.

Would it be possible to refactor the configuration under arch/arm/ so
that this option is not set for the platforms that don't need it?

There was a brief discussion of this issue on the linux-sunxi mailing
list suggesting it may have worked better in the past:

On 28/12/14 16:15, Chen-Yu Tsai wrote:
> It seems some recent changes in upstream broke building with hard float
> toolchains. Best use soft float.
>
> It's probably these commits:
>
> bf1af3d ARM: merge commonly-defined PLATFORM_RELFLAGS
> 3102274 ARM: refactor compiler options in config.mk

( https://www.mail-archive.com/linux-sunxi at googlegroups.com/msg09271.html )

Thanks very much,
B.R. Oake.

                 reply	other threads:[~2015-01-04  2:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=54A89FA6.8050105@openmailbox.org \
    --to=broake@openmailbox.org \
    --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