This is for the Android NDK project, but I assume that it applies to GCC in general for ARM.
I know that Android NDK uses soft float to ensure compatibility with ARMv5, but it occurs to me that when compiling the ARMv7 library for our project, all calls built into the library can use hard float and use only soft float for calls to other libraries , but I'm not sure that even this can be said to the compiler. I feel that this is not the case, but I hope someone can know how to do it.
(As a side note - if it's possible with Clang in the NDK or if Clang just does this, it would be nice to know)
Some background: this is a physics-based library compiled with NDK, so hard to use floating point, and I'm looking for possible optimizations.
Edit: by thinking about this, it can only determine if the function was external during communication, while hard / soft float affects the compiler, so I assume that if possible, I will need to manually specify the functions in which the hard should be used float so the compiler knows.
gcc android android-ndk
Andrew Porritt
source share