summaryrefslogtreecommitdiffstats
path: root/packaging/android
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-11-24 11:24:17 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-30 11:20:34 -0800
commit2bed16203fe74045cf52ba325798dca65f6e37e0 (patch)
tree29f62096ebe670eef7cb28fe60e22144d820e023 /packaging/android
parente77566e2629edc03eb399a73934386cc4f3bf346 (diff)
downloadsubsurface-2bed16203fe74045cf52ba325798dca65f6e37e0.tar.gz
Android build: always use -fPIC
make sure that all lib code is compiled with -fPIC as things will not link due to error "requires unsupported dynamic reloc R_ARM_REL32" (for arm build). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'packaging/android')
-rwxr-xr-xpackaging/android/build.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/packaging/android/build.sh b/packaging/android/build.sh
index ee3aa8271..99addc346 100755
--- a/packaging/android/build.sh
+++ b/packaging/android/build.sh
@@ -153,9 +153,10 @@ export CC=${BUILDROOT}/ndk-$ARCH/bin/clang
export CXX=${BUILDROOT}/ndk-$ARCH/bin/clang++
# autoconf seems to get lost without this
export SYSROOT=${BUILDROOT}/ndk-$ARCH/sysroot
-export CFLAGS=--sysroot=${SYSROOT}
-export CPPFLAGS=--sysroot=${SYSROOT}
-export CXXFLAGS=--sysroot=${SYSROOT}
+export CFLAGS="--sysroot=${SYSROOT} -fPIC"
+export CPPFLAGS="--sysroot=${SYSROOT} -fPIC"
+export CXXFLAGS="--sysroot=${SYSROOT} -fPIC"
+
if [ "$PLATFORM" = "Darwin" ] ; then
JAVA_HOME=$(/usr/libexec/java_home)
export JAVA_HOME