From 2bed16203fe74045cf52ba325798dca65f6e37e0 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Sat, 24 Nov 2018 11:24:17 +0100 Subject: 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 --- packaging/android/build.sh | 7 ++++--- 1 file 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 -- cgit v1.2.3-70-g09d2