mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 17:19:36 +00:00
Improve ARM compatibility
STANDALONE-TOOLCHAIN.html in Android NDK says: It is recommended to use the -mthumb compiler flag to force the generation of 16-bit Thumb-1 instructions (the default being 32-bit ARM ones). If you want to target the 'armeabi-v7a' ABI, you will need ensure that the following two flags are being used: CFLAGS='-march=armv7-a -mfloat-abi=softfp' Note: The first flag enables Thumb-2 instructions, and the second one enables H/W FPU instructions while ensuring that floating-point parameters are passed in core registers, which is critical for ABI compatibility. Do *not* use these flags separately! Thanks to Peter Osterlund for pointout this doc and for showing me an example Makefile to follow. No functional change.
This commit is contained in:
parent
0915f85895
commit
aee404f532
1 changed files with 1 additions and 1 deletions
|
@ -296,7 +296,7 @@ ifeq ($(optimize),yes)
|
|||
endif
|
||||
|
||||
ifeq ($(arch),armv7)
|
||||
CXXFLAGS += -fno-gcse
|
||||
CXXFLAGS += -fno-gcse -mthumb -march=armv7-a -mfloat-abi=softfp
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue