Chi Hsuan Yen added the comment:
Several days ago I have once tried to set
CC="clang -target $(TARGET) -gcc-toolchain $(GCC_TOOLCHAIN)", and it failed to
build some dependency of Python (I can't remember). Just tried and everything
is OK. Dunno what's changed. Anyway both approaches (-target
Xavier de Gaye added the comment:
With configure run as './configure CC="$(CC)" ...' and when CC is set to:
CC = clang --sysroot=$(SYSROOT) -target $(TARGET) -gcc-toolchain
$(GCC_TOOLCHAIN)
and building for armv7 on android-21, then configure runs $CPP as:
checking for CPP... clang
New submission from Chi Hsuan Yen:
Motivation: Android NDK is deprecating GCC and moving ot Clang/LLVM. From [1]:
We strongly recommend switching to Clang.
GCC in the NDK is now deprecated in favor of Clang.
This patch fixes the only one problem when migrating GCC to Clang.
In my build