How to cross-compile clang for Android ARM device?

Hi, All.

I’m trying to cross-compile clang to use on arm android device.

I’ve prepared standalone toolchain from android ndk.
Now i’m getting configuration error:

export CROSS_COMPILE=arm-linux-androideabi
export CC=${CROSS_COMPILE}-gcc
export CXX=${CROSS_COMPILE}=g++
export NDK=/softdev/android-ndk-r8e
export ANDROID_NDK_ROOT=/softdev/android-ndk-r8e
export SYSROOT=$NDK/platforms/android-8/arch-arm
export PATH=/softdev/arm-toolchain/bin:$PATH:/softdev/android-ndk-r8e/platforms/android-8/arch-arm

./configure --host=arm-linux-androideabi --target=arm-linux-androideabi --prefix=/softdev/arduinodroid_clang/arm

Error:
checking tool compatibility… configure: error: g++|clang++|icc required but not found

Can anybody help me or describe step-by-step?

Thanks in advance!

My bad - i had mistyping:
export CXX=${CROSS_COMPILE}=g++

should be:
export CXX=${CROSS_COMPILE}-g++

BUT later i have configuration/make error:

mba-anton:llvm asmirnov$ sudo make
configure: error: Already configured in /Users/asmirnov/Documents/dev/src/llvm
make[1]: *** No targets specified and no makefile found. Stop.
make: *** [cross-compile-build-tools] Error 1

Makefile exists

My bad - i had mistyping:export CXX=${CROSS_COMPILE}=g++
should be:
export CXX=${CROSS_COMPILE}-g++

BUT later i have configuration/make error:

mba-anton:llvm asmirnov$ sudo make

sudo make

Why are you using sudo here?