[llvmlinux] ARM -mfpu=-softvfp+vfp

Renato Golin renato.golin at linaro.org
Thu Feb 20 18:28:55 UTC 2014


On 20 February 2014 16:33, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> Well, first thing to realise is that it's not -mfpu=softvfp+vfp at all.
> It's -Wa,-mfpu=softvfp+vfp.  So it's a binutils option, not a C compiler
> option, so the binutils documentation is relevant:

Hi Russel,

Sorry for not being clear, yes, it's an assembler option, not a compiler one.


> This is done to ensure that the assembler accepts the VFP instructions
> it's given, and builds them without warning/error irrespective of the
> CPU architecture being built for.

In the case of all except "softvfp", this is completely true. For the
softvfp case there is one *additional* meaning, which is:

"Don't error when linking with other soft-float binaries because
support for build attributes in gas is incomplete."

However, this is a very old (and fixed) problem and, as -mfpu's
documentation states afterwards:

"If -msoft-float is specified this specifies the format of
floating-point values."

So, softvfp and softvfp+vfp is useless as a -mfpu value on current
versions of GCC, and that's my point.

We should change from "-Wa,-mfpu=softvfp+vfp" to "-Wa,-msoft-float
-Wa,-mfpu=vfp".

cheers,
--renato


More information about the LLVMLinux mailing list