I'd like to cross-compile clang to use as compiler for avr (arduino to be more detailed). i feel i should do smth like next:
- create standalone toolchain from android ndk
- compile with correct CC and CXX parameters.
Smth else? Does it support --target=avr or how can i compile? Does it make sense as it will be used like IDE autocompletion tool to parse the sources using clang-c API?
UPDATE: configuration with --host and --target params:
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
make
... leads to make error (Makefile exists):
llvm asmirnov$ sudo make
llvm[0]: Constructing LLVMBuild project information.
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