summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-05-07 13:57:34 +0200
committerMax Kellermann <max@musicpd.org>2020-05-07 13:58:36 +0200
commitf24ab120ee8195677d1be64b19f2d1c6d891e27d (patch)
treedd8df01cef48034d4be0bfd97c5b426ed79ce50e /android
parent68349bc55c736c75685154c1cb6d95f3bc6baf18 (diff)
android/build.py: use -fpic instead of -fPIC on ARM/Aarch64
Sync with the Android NDK build scripts.
Diffstat (limited to 'android')
-rwxr-xr-xandroid/build.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/android/build.py b/android/build.py
index 7fb90173f..91e292683 100755
--- a/android/build.py
+++ b/android/build.py
@@ -26,7 +26,7 @@ android_abis = {
'ndk_arch': 'arm',
'toolchain_arch': 'arm-linux-androideabi',
'llvm_triple': 'armv7-linux-androideabi',
- 'cflags': '-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp',
+ 'cflags': '-fpic -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp',
},
'arm64-v8a': {
@@ -34,7 +34,7 @@ android_abis = {
'ndk_arch': 'arm64',
'toolchain_arch': 'aarch64-linux-android',
'llvm_triple': 'aarch64-linux-android',
- 'cflags': '',
+ 'cflags': '-fpic',
},
'x86': {
@@ -42,7 +42,7 @@ android_abis = {
'ndk_arch': 'x86',
'toolchain_arch': 'x86',
'llvm_triple': 'i686-linux-android',
- 'cflags': '-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32',
+ 'cflags': '-fPIC -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32',
},
'x86_64': {
@@ -50,7 +50,7 @@ android_abis = {
'ndk_arch': 'x86_64',
'toolchain_arch': 'x86_64',
'llvm_triple': 'x86_64-linux-android',
- 'cflags': '-m64',
+ 'cflags': '-fPIC -m64',
},
}
@@ -97,7 +97,6 @@ class AndroidNdkToolchain:
llvm_triple = abi_info['llvm_triple'] + android_api_level
common_flags = '-Os -g'
- common_flags += ' -fPIC'
common_flags += ' ' + abi_info['cflags']
toolchain_bin = os.path.join(toolchain_path, 'bin')