Commit 9e058732 authored by Max Kellermann's avatar Max Kellermann

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".
parent cad5d112
...@@ -66,6 +66,7 @@ class AndroidNdkToolchain: ...@@ -66,6 +66,7 @@ class AndroidNdkToolchain:
llvm_triple = 'armv7-none-linux-androideabi' llvm_triple = 'armv7-none-linux-androideabi'
common_flags = '-Os -g' common_flags = '-Os -g'
common_flags += ' -fPIC'
common_flags += ' -march=armv7-a -mfloat-abi=softfp' common_flags += ' -march=armv7-a -mfloat-abi=softfp'
toolchain_bin = os.path.join(toolchain_path, 'bin') toolchain_bin = os.path.join(toolchain_path, 'bin')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment