regarding compiling clang for different platform

Hi,
I am new to LLVM
I want to use llvm and clang on Android, I have downloaded android toolchain and did the configure for llvm using the following commad
./configure --build=arm-linux-androideabi --host=arm-linux-androideabi --target=arm-linux-androideabi --with-float=hard --with-fpu=neon --enable-targets=arm --enable-optimized --enable-assertions

and was getting the error

“checking build system type… Invalid configuration arm-linux-androideabi': system androideabi’ not recognized
configure: error: /bin/bash autoconf/config.sub arm-linux-androideabi failed”

i modified the command available in the following link
http://llvm.org/releases/3.3/docs/HowToBuildOnARM.html

./configure --build=armv7l-unknown-linux-gnueabihf \
--host=armv7l-unknown-linux-gnueabihf \
--target=armv7l-unknown-linux-gnueabihf --with-cpu=cortex-a9 \
--with-float=hard --with-abi=aapcs-vfp --with-fpu=neon \
--enable-targets=arm --enable-optimized --enable-assertions

can any one help me on how to do it…
Thanks in Advance…
Have A Nice Day…

Thanks & Regards
chanakya

Hi Venkata,

Some folks are working on Clang+LLVM to work on Android on a separate project called LLVMLinux: http://llvm.linuxfoundation.org/index.php/Main_Page

There you can find a lot of information on how to build Android with Clang, and find the modified trees for the kernel and userland, as well as LLVM to compile and boot on your device. Feel free to join the mailing list and ask the same question, I’m sure they’ll be able to help.

cheers,
–renato

Hi Venkata,

./configure --build=arm-linux-androideabi --host=arm-linux-androideabi
--target=arm-linux-androideabi --with-float=hard --with-fpu=neon
--enable-targets=arm --enable-optimized --enable-assertions

Renato's suggestion is a good one, but I suspect the immediate problem
here is that this configure line is for building *on* an ARM board.

You're probably executing this on your x86 desktop, which means the
--build option wouldn't work. Also, unless you actually want to run
the resulting Clang on Android (rather than just use it to compile for
Android), the --host isn't needed either.

But then you'll hit the fun of trying to get Clang to find Android's
headers and libraries, which is where Renato's suggestion becomes even
better. We're not really Android experts here (mostly).

Cheers.

Tim.

Some Linaro folks are also trying to build Android with Clang and they have
some wrappers to make clang work transparently (as a cross-compiler from
Intel to ARM). They all hangout on the LLVMLinux mailing list or IRC
channel (OFTC, #llvmlinux).

There are also ABI issues, since androideabi is not gnueabi which is not
aeabi and Clang/LLVM knows very little about the difference (but the Kernel
breaks because of enum sizes and other little things).

I never built it myself, but I know that it's not trivial because the
Android build system is something of a marvel of the modern world that has
GCC hard-coded all over the place. Using the Clang wrapper should work with
a standard Clang binary (if it has the ARM back-end), so the way you build
Clang shouldn't matter much.

Good luck!
--renato