taka-no-me / android-cmake

CMake toolchain file and other scripts for the Android NDK
1.22k stars 437 forks source link

How to choose explicitly the GCC version to be used (arch dependent) #29

Closed opatry closed 9 years ago

opatry commented 9 years ago

Hi,

I wish I can stick to NDK r10d (cf. Android NDK, Revision 10d (December 2014) changelog) defaults for GCC versions:

Made GCC 4.8 the default for all 32-bit ABIs. Deprecated GCC 4.6, and will remove it next release. To restore previous behavior, either add NDK_TOOLCHAIN_VERSION=4.6 to ndk-build, or add --toolchain=arm-linux-androideabi-4.6 when executing make-standalone-toolchain.sh on the command line. GCC 4.9 remains the default for 64-bit ABIs.

I didn't succeed using ANDROID_STANDALONE_TOOLCHAIN and didn't see a "version" option made available. I've also tried using NDK_TOOLCHAIN_VERSION as for ndk-build but didn't worked. I've seen that all versions of toolchains are detected in the targeted SDK.

Thanks.

taka-no-me commented 9 years ago

The ANDROID_STANDALONE_TOOLCHAIN is there for completely different purpose. What you need is ANDROID_TOOLCHAIN_NAME.

opatry commented 9 years ago

Thanks for your help, it now works as expected.