[cfe-dev] ABI of libgcc functions on hard-float ARM
Renato Golin via cfe-dev
cfe-dev at lists.llvm.org
Thu Apr 21 13:36:28 PDT 2016
On 21 April 2016 at 20:37, Brian Silverman via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> I'm pretty sure using clang with libgcc is supposed to work, so this seems
> like a bug. Is there some solution I'm not seeing?
Hi Brian,
As far as I'm aware, your analysis is spot on. Compiler-RT does assume
soft-float for obvious reasons, but as you have demonstrated, this is
not correct in some cases. GCC seems to have multiple.
These are the variants I have on my box:
/usr/lib/gcc/arm-none-eabi/5.3.0/armv6-m/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/armv7-m/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/armv7e-m/softfp/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/armv7e-m/fpu/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/armv7e-m/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/armv7-ar/thumb/softfp/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/armv7-ar/thumb/fpu/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/armv7-ar/thumb/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/fpu/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/thumb/libgcc.a
/usr/lib/gcc/arm-none-eabi/5.3.0/libgcc.a
While it'd be great to have all of them optimised for each arch, I
think we can start with hard and soft float for now. I also don't know
if we support Thumb-only code in compiler-rt, but we should.
I checked with the GCC folks, and the behaviour is:
* arm-linux-gnueabi has *only* soft-float
* arm-linux-gnueagihf has *only* hard float
* arm-none-eabi has *all* variations (above) with the default being soft-float
Can you create a bug in LLVM's bugzilla with your analysis and all the
info here, so we can have a look? Please copy me and the people I've
added CC on this email.
Thanks!
--renato
More information about the cfe-dev
mailing list