[llvmlinux] ARM -mfpu=-softvfp+vfp

Arnd Bergmann arnd at arndb.de
Thu Feb 20 15:56:18 UTC 2014


On Wednesday 19 February 2014, Behan Webster wrote:
> Cc-ing Arnd Bergmann as he is relevant to this discussion.
> On 02/19/14 03:18, Renato Golin wrote:
> > Folks,
> >
> > Following bug:
> >
> > http://llvm.org/bugs/show_bug.cgi?id=18689
> >
> > I think the fix for the second problem (softvfp) is *also* to change
> > the compilation flags.
> >
> > The rationale is in Bernie's email:
> >
> > http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20140217/099354.html
> >
> > Mainly that "softvfp+vfp" is ambiguous in many different ways and
> > implementing it would be promoting differences between the compilers,
> > rather than bringing them back together.
> >
> > Also, we need first to ask what do GAS need to know about the PCS? Is
> > this just something that unknowingly got in for the Android build?
> > Does that flag really needs to be passed in that way, or can it be
> > just -Wa,-mfpu=vfp + -mfloat-abi=softfp? That has the same behaviour
> > on the compiler and is supported by both LLVM and GCC.
> Arnd Bergman is likely the right person to ask about the flags set in 
> arch/arm/vp/Makefile

I don't even know what -mfpu=softvfp+vfp means, and I can't find it
in the documentation.
> 
> KBUILD_AFLAGS   :=$(KBUILD_AFLAGS:-msoft-float=-Wa,-mfpu=softvfp+vfp 
> -mfloat-abi=soft)
> 
> Would there be issues in changing the flags to -Wa,-mfpu=vfp 
> -mfloat-abi=softfp?

I added the -mfload-abi=softfp part in the Makefile to work around a
problem with hardfloat gcc, but the bug you are linking to seems to be
more concerned about the -mfpu=softvfp+vfp part being hard.

That was added by Russell in
http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=1a6be26d5b1a86f66ef60e5b73bae64d50873724

Maybe he knows what will work for you.

What we want to achieve is to build the file that uses vfp instructions,
independent of what CPU we are targetting and whether the compiler
defaults to soft-float or hard-float ABI.

	Arnd


More information about the LLVMLinux mailing list