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>
This commit is contained in:
Jan Mulder 2018-11-24 11:24:17 +01:00 committed by Dirk Hohndel
parent e77566e262
commit 2bed16203f

View file

@ -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