Android NDK compile gmp library

对着背影说爱祢 提交于 2019-11-30 14:24:48

I don't know if GMP use autoconf but if it does then you can try the following:

you will need to follow instruction android-ndk-r6/docs/STANDALONE-TOOLCHAIN.html 3/ Invoking the compiler (the easy way)

Assuming that you have defined $NDKROOT to point to root of NDK

$NDKROOT/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=$NDKROOT/android_armeabi   

export CC="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-gcc --sysroot=$NDKROOT/android_armeabi/sysroot"
export CXX="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-g++ --sysroot=$NDKROOT/android_armeabi/sysroot"
export AR="$NDKROOT/android_armeabi/bin/arm-linux-androideabi-ar"
export SYSROOT="$NDKROOT/android_armeabi/sysroot"
export PATH="$NDKROOT/android_armeabi/bin":$PATH

./configure --host=arm-linux-androideabi

I was able to compile various open source libs with this recipe. Good luck!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!