[LLVMdev] build errors while cross compiling llvm-gcc for ARM

Sanjeev chugh sanjuchugh at gmail.com
Mon Jul 12 06:37:13 PDT 2010


Sorry for not explaining well.

After compiling with g++-cross
g++-cross -c a.c

I do link using this command
/gold_binutils/build/gold/ld-new -plugin
~/Desktop/Sanjeev/LLVM/llvm-2.7/Release/lib/libLLVMgold.so --eh-frame-hdr
-melf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o
/usr/lib/crti.o
/usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0/crtbegin.o
-L/usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0  -L/usr/local/lib -lgcc
--as-needed -lgcc_s --no-as-needed -lc -lgcc -lpthread -lrt --as-needed
-lgcc_s --no-as-needed /usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0/crtend.o
/usr/lib/crtn.o a.o -o sanjeevtest

On Mon, Jul 12, 2010 at 7:03 PM, Anton Korobeynikov <anton at korobeynikov.info
> wrote:

> > Yes, I'm following this page only and did whatever is mentioned there.
> It doesn't seem so. E.g. it contains the following line:
> "The linker takes a -plugin option that points to the path of the
> plugin .so file."
> and
> "Replace that with ld-new -plugin /path/to/libLLVMgold.so to test it out."
>
> At least you are not telling ld-new to use any plugin. Thus ld-new
> does not know how to deal with LLVM IR inside .o and you obtain:
> >ld-new libs a.o -o binary
> >a.o : incompatible object file
>
> --
> 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/20100712/f8033e13/attachment.html>


More information about the llvm-dev mailing list