This is for an Android NDK project, but I'm guessing it applies to GCC in general for ARM.
I know that the Android NDK uses soft float to maintain compatibility with ARMv5, but it occurs to me that when compiling an ARMv7 library for our project, all calls internal to the library could use hard float, and only use soft float for calls to other libraries, but I'm not sure if it's even possible to tell the compiler to do this. My feeling is that it's not, but I'm hoping that someone might know a way to do it.
(As a side note - if this is possible with Clang in the NDK or if Clang just does this, it'd be good to know)
Some background: it's a physics based library being compiled with the NDK, so heavy on the use of floating point, and I'm looking into possible optimisations.
Edit: thinking about it, it could only determine whether or not a function was external at link time, whereas hard/soft float affects the compiler, so I'm guessing that if this is possible, I'd need to manually specify the functions where hard float should be used so the compiler would know.