From 9e058732ee2d7bf82f2795c4f964197bc619dc77 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 19 Jan 2018 12:55:57 +0100 Subject: [PATCH] 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". --- android/build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/android/build.py b/android/build.py index c2ee971e2..0b001e7da 100755 --- a/android/build.py +++ b/android/build.py @@ -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')