android/build.py: add -fpic

Android native code should be position-independent.

The NDK build scripts use "-fpic" instead of "-fPIC" for ARM, but that
doesn't work with FFmpeg's assembly code, because it requires
R_ARM_MOVW_ABS_NC which is unavailable with "-fpic".
This commit is contained in:
Max Kellermann 2018-01-19 12:55:57 +01:00
parent cad5d11261
commit 9e058732ee
1 changed files with 1 additions and 0 deletions

View File

@ -66,6 +66,7 @@ class AndroidNdkToolchain:
llvm_triple = 'armv7-none-linux-androideabi'
common_flags = '-Os -g'
common_flags += ' -fPIC'
common_flags += ' -march=armv7-a -mfloat-abi=softfp'
toolchain_bin = os.path.join(toolchain_path, 'bin')