Skip to content

Commit

Permalink
Close #2047: Use android ndk binutils when building with --use-ndk-cf…
Browse files Browse the repository at this point in the history
…lags options.

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5666 74dad513-b988-da41-8d7b-12977e46ad98
  • Loading branch information
trengginas committed Sep 29, 2017
1 parent d063757 commit 10e3d3a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions configure-android
Expand Up @@ -76,9 +76,9 @@ if test "$1" = "--use-ndk-cflags"; then
exit 1
fi

echo "====="
echo "NDK_OUT : ${NDK_OUT}"
echo "====="
# echo "====="
# echo "NDK_OUT : ${NDK_OUT}"
# echo "====="

for i in $NDK_OUT; do
if test "x${NDK_CXX}" != "x" -a "$i" = "-o"; then break; fi
Expand Down Expand Up @@ -141,8 +141,13 @@ if test "$1" = "--use-ndk-cflags"; then
export RANLIB=`echo ${NDK_CXX}|sed 's/-g++/-ranlib/'`;
export LDFLAGS="${LDFLAGS} --sysroot=${ANDROID_SYSROOT}"
else
#export AR="${NDK_TOOLCHAIN}/bin/${NDK_TARGET}-ar"
#export RANLIB="${NDK_TOOLCHAIN}/bin/${NDK_TARGET}-ranlib"
# find ar and ranlib
TC_AR=`find ${NDK_TOOLCHAIN}/bin/ -name "*-ar" | grep -v "gcc"`
TC_RANLIB=`find ${NDK_TOOLCHAIN}/bin/ -name "*-ranlib" | grep -v "gcc"`
if test "x${TC_AR}" != "x" -a "x${TC_RANLIB}" != "x"; then
export AR=$TC_AR
export RANLIB=$TC_RANLIB
fi
TARGET_HOST="arm-linux-androideabi"
export LDFLAGS="${LDFLAGS} --sysroot=${ANDROID_SYSROOT} -target ${NDK_TARGET} -gcc-toolchain ${NDK_TOOLCHAIN}"
fi
Expand Down

0 comments on commit 10e3d3a

Please sign in to comment.