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

Liu proljc at gmail.com
Sun May 9 22:54:27 PDT 2010


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 at korobeynikov.info>

> 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.
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100510/0714a437/attachment.html>


More information about the llvm-dev mailing list