How to build a cross llvm-gcc compiler for Arm Cortex-A8

hi
My host is Linux on x86, and I want llvm-gcc generate code for Arm Cortex-A8.
I saw that in LLVM 2.7 Release Notes, but I can’t find step to build it. Anyone tell me?
llvm-gcc now has complete support for the ARM v7 NEON instruction set. This support differs slightly from the GCC implementation. Please see the ARM Advanced SIMD (NEON) Intrinsics and Types in LLVM Blog Post for helpful information if migrating code from GCC to LLVM-GCC

Thank you all

-Liu

Hello

      My host is Linux on x86, and I want llvm-gcc generate code for Arm
Cortex-A8.
      I saw that in LLVM 2.7 Release Notes, but I can't find step to build
it. Anyone tell me?

Build llvm-gcc exactly the same way you're building the cross gcc for
your target.

I do it like this:
export PATH=/opt/arm-2010q1/bin/:$PATH

…/llvm-gcc-4.2-2.7.source/configure --prefix=/opt/llvm --enable-languages=c,c++ --enable-checking --enable-llvm=/root/llvm-obj --disable-bootstrap --disable-multilib --target=arm-none-linux-gnueabi --enable-cross --with-as=/opt/arm-2010q1/arm-none-linux-gnueabi/bin/as --with-ld=/opt/arm-2010q1/arm-none-linux-gnueabi/bin/ld
make
it gets error:

/opt/arm-2010q1/arm-none-linux-gnueabi/bin/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status

I copy arm-linux’s crti.o and crtn.o there. It gets another error:

/root/llvm-gcc-obj/./gcc/crti.o: In function _init': /home/oe/stuff/workspace/work/armv7a-angstrom-linux-gnueabi/glibc-2.9-r36.3/build-arm-angstrom-linux-gnueabi/nptl/crti.S:37: undefined reference to __pthread_initialize_minimal_internal’
/opt/arm-2010q1/arm-none-linux-gnueabi/bin/ld: ./libgcc_s.so.1.tmp: hidden symbol `__pthread_initialize_minimal_internal’ isn’t defined
/opt/arm-2010q1/arm-none-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

2010/5/7 Anton Korobeynikov <anton@korobeynikov.info>