Posts: 3,100
Registered: ‎02-07-2002

RAIL with hardware floating point library



I just tried to set my compiler and linker settings to -mfloat-abi=hard but this fails to build since the RAIL library is not built with this setting. Now I don't have a clue whether RAIL actually uses floating point calculations. And when not whether it's possible to tell gcc not to assume any float ABI.


Or maybe SiLabs can provide another library compiled with this ABI to link against. I'm asking because AFAIK the EFR32 all have a hardware floating point unit and it seems wasteful to use -mfloat-abi=softfp.



Posts: 8
Registered: ‎05-11-2017

Re: RAIL with hardware floating point library


Use -mfloat-abi=softfp. It allows using floating-point hardware while still allowing RAIL to be neutral towards the floating-point capabilities of the host processor.


From the gcc man page:

           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.