Use -pie -fPIC for Android builds (required for Android L)

This commit is contained in:
pancake 2014-11-07 01:02:23 +01:00
parent 5ec319244b
commit 1256b77747
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
#CC=arm-linux-androideabi-gcc
CC=ndk-gcc
CC=ndk-gcc -fPIC -pie -fPIE
#RANLIB=ndk-ranlib
USERCC=ndk-gcc
RANLIB=arm-linux-androideabi-ranlib

View File

@ -57,6 +57,7 @@ if [ -z "${NDK_BINS}" ]; then
fi
CFLAGS="--sysroot=${PLATFORM_ROOT}"
CFLAGS="${CFLAGS} -I${PLATFORM_PATH}/include"
CFLAGS="${CFLAGS} -pie -fPIC"
LDFLAGS=-L${PLATFORM_PATH}/lib
#LDFLAGS="${LDFLAGS} -nostdlib"
#LDFLAGS="${LDFLAGS} -lc -ldl"