[LLVMdev] LLVM for crosscompiling?

Chris Lattner sabre at nondot.org
Mon Apr 14 10:42:13 PDT 2008


On Mon, 14 Apr 2008, Sunjae Park wrote:
> Hi, I'm still working on this problem by first trying code without the Altivec
> intrinsics. I'm trying to use the cross compiler on the c code outputted
> by "llc -march c" and have run into this linker problem (spewed by the cross
> compiler):

If you want to use llvm-gcc as a cross compiler, you must configure it as 
a cross compiler, and compile the output with the appropriate cross 
toolchain.  LLVM does not implicitly make your code portable, see:
http://llvm.org/docs/tutorial/LangImpl8.html#targetindep

for example.

-Chris

> Command line : error: L0039: reference to undefined symbol .fopen64 in
> file /tmp/cc4tgLu5.o
> Command line : error: L0039: reference to undefined symbol ._IO_putc in
> file /tmp/cc4tgLu5.o
> Command line : error: L0039: reference to undefined symbol ._IO_getc in
> file /tmp/cc4tgLu5.o
> Command line : error: L0039: reference to undefined symbol .stat64 in
> file /tmp/cc4tgLu5.o
> Command line : error: L0039: reference to undefined symbol .popen in
> file /tmp/cc4tgLu5.o
> Command line : error: L0039: reference to undefined symbol .pclose in
> file /tmp/cc4tgLu5.o
> Command line : error: L0039: reference to undefined symbol .gettimeofday in
> file /tmp/cc4tgLu5.o
>
> ...and so on. Any reason why llc is generating these symbols with a "." in
> front of them?
>
> Thanks.
> --
> Sunjae Park
> MS. Georgia Tech College of Computing
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list