Per this response , I tried to build using the -mfloat-abi=hard
flag. In Application.mk
I have
APP_ABI := armeabi-v7a
APP_CFLAGS += -mfloat-abi=hard
and got this error
error: ./obj/local/armeabi-v7a/objs/XXX.o uses VFP register arguments, output does not
I found this link where someone posted that -mfloat-abi=hard does not work with the stock toolchain.
Is this still the case in NDKr9?
armeabi-v7a is the older target, for 32 bit arm cpus, almost all arm devices support this target. arm64-v8a is the more recent 64 bit target (similar to the 32-bit -> 64 bit transition in desktop computers). I think most new devices are 64 bit, but not sure.
Description. On most devices x86_64 is compatible with x86 and arm64-v8a is compatible with armeabi-v7a.
armeabi-v7a – ARM-based CPUs with hardware floating-point operations and multiple CPU (SMP) devices. Note that armeabi-v7a machine code will not run on ARMv5 devices. arm64-v8a – CPUs based on the 64-bit ARMv8 architecture. x86 – CPUs that support the x86 (or IA-32) instruction set.
The ARMv7 architecture is the basis for all current 32-bit ARM Cortex™ processors, including the Cortex-A15 and Cortex-A9 processors. The ARMv8 architecture is the first ARM architecture that includes 64-bit execution, enabling processors based on the architecture to combine 64-bit execution with 32-bit execution.
armeabi-v7a – ARM-based CPUs with hardware floating-point operations and multiple CPU (SMP) devices. Note that armeabi-v7a machine code will not run on ARMv5 devices. arm64-v8a – CPUs based on the 64-bit ARMv8 architecture. x86 – CPUs that support the x86 (or IA-32) instruction set.
1 armeabi-v7a – ARM-based CPUs with hardware floating-point operations and multiple CPU (SMP) devices. ... 2 arm64-v8a – CPUs based on the 64-bit ARMv8 architecture. 3 x86 – CPUs that support the x86 (or IA-32) instruction set. ... 4 x86_64 CPUs that support the 64-bit x86 (also referred as x64 and AMD64) instruction set.
armeabi-v7a This ABI is for 32-bit ARM-based CPUs. The Android variant includes Thumb-2 and the VFP hardware floating point instructions, specifically VFPv3-D16, which includes 16 dedicated 64-bit floating point registers.
Many x86-based devices can also run armeabi-v7a and armeabi NDK binaries. For such devices, the primary ABI would be x86, and the second one, armeabi-v7a. You can force install an apk for a specific ABI .
Have you tried?
APP_ABI := armeabi-v7a-hard
This seems to work in NDKr9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With