Hard float ABI on Android with Clang

Hi all,

My project uses hard float ABI, i.e. armeabi-v7a-hard, but unfortunately FMOD uses the soft one (armeabi-v7a).

In fmod_common.h F_STDCALL ensures that all FMOD’s functions will be called using soft float, but there is an exception for Clang.

Is it possible to include soft float attribute for Clang as well?
Or maybe there are known workarounds for this issue?

Maybe it should be based on the version of Clang; according to info present in NDK’s header it should work from Clang 3.4 onwards:

NOTE: Disable for clang for now unless _NDK_MATH_NO_SOFTFP=1, because
clang before 3.4 doesn’t allow change of calling convension for
builtin and produces error message reads

Thanks for help!

We have our header configured the same as the NDK header, it might be possible to change but I’m unsure.

Can you verify that removing “&& !defined(clang)” from fmod_common.h works?

Hi Mathew,

I’ve checked this with versions 1.07.06 and 1.08.00 and it works fine.
But I guess it could cause problems when using older clang…

We will look at making the FMOD header compatible with hard float and modern versions of Clang for a future release.

For now the recommended work around is to remove the “&& !defined(_clang_)” section from fmod_common.h if you know you are using a compatible version of Clang.