Sanjeev chugh
2010-Jul-12 13:28 UTC
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
Yes, I'm following this page only and did whatever is mentioned there. On Mon, Jul 12, 2010 at 6:57 PM, Sanjeev chugh <sanjuchugh at gmail.com> wrote:> Did you mean ld-new ? > > ld-new -v > GNU gold (GNU Binutils 2.20.51.20100707) 1.9 > > ld-new --help > ./ld-new: supported targets: elf32-i386 elf32-i386-freebsd elf64-x86-64 > elf64-x86-64-freebsd elf64-sparc elf32-sparc elf64-powerpcle elf64-powerpc > elf32-powerpcle elf32-powerpc elf32-bigarm elf32-littlearm > > > > > On Mon, Jul 12, 2010 at 6:52 PM, Anton Korobeynikov < > anton at korobeynikov.info> wrote: > >> > ld-new works only with those objects which are compiled using native gcc >> but >> > doesn't work for cross-compiler gcc/arm. >> Ok, please show: >> >> ld --version >> and last few lines of the ld --help output >> >> -- >> 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/c2d676db/attachment.html>
Anton Korobeynikov
2010-Jul-12 13:33 UTC
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
> 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
Sanjeev chugh
2010-Jul-12 13:37 UTC
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
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>
Possibly Parallel Threads
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM
- [LLVMdev] build errors while cross compiling llvm-gcc for ARM
- [LLVMdev] libLLVMgold.so: could not load plugin library
- [LLVMdev] libLLVMgold.so: could not load plugin library