It's also a good idea to discuss on the list.
It's already mentioned in the issue but I wanted to clearly distinguish "-mfloat-abi=soft" from "floating point emulation". -mfloat-abi=soft does not imply floating point emulation.
On ARM -mfloat-abi=soft means emit library calls with integer registers instead of float instructions and float register. The library functions may in fact use hard float (the purpose of -mfloat-abi=softfp).
-mfloat-abi=soft is for faster float emulation when no FPU is present. illegal instruction faults are more expensive than function calls, but this is at the expense of slower float on hardware with an FPU due to the additional function call overhead. The library routines themselves are typically hard float.
-mfloat-abi=soft would presumably ignore -march FD flags assuming it has the same meaning as ARM, which is to emit library calls.
The soft float support libs a). soft float lib with hard float; would need to be compiled with -mfloat-abi=softfp (see below) and IMAFD, or b). floating point emulation which doesn't care as it is receiving floats in integer registers and is using only integer code.
Here's the matrix:
-mfloat-abi=hard, FPU not present: trap and emulate
-mfloat-abi=hard, FPU present: normal execution
-mfloat-abi=soft, FPU not present: call floating point emulation library
-mfloat-abi=soft, FPU present: call hard float wrapper functions.
The rationale is that procedure calls are faster than faulting at the expense of a slow down when FPU is present, for universal binaries targeting IMA and IMAFD.
-mfloat-abi=softfp is the ARM option that changes calling convention to use integer registers but still omits hard float. Actually this option makes sense for the support library as it needs the integer ABI but to emit hard float instructions. This is slightly different to what is currently mentioned on the issue (which doesn't mention -mfloat-abi=softfp).
"
-mfloat-abi=name- Specifies which floating-point ABI to use. Permissible values are: ‘soft’, ‘softfp’ and ‘hard’.
Specifying ‘soft’ causes GCC to generate output containing library calls for floating-point operations. ‘softfp’ allows the generation of code using hardware floating-point instructions, but still uses the soft-float calling conventions. ‘hard’ allows generation of floating-point instructions and uses FPU-specific calling conventions.
The default depends on the specific target configuration. Note that the hard-float and soft-float ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries.
Sent from my iPhone