On Sunday 06 April 2008 06:53:06 am Bill Wendling wrote:> (snip) > Hi Sunjae, > > You'll need to compile llvm-gcc as a cross-compiler to get it to > accept altivec intrinsics and PPC-specific flags. > > -bwThanks, Bill. I was afraid of that. Any pointers on how to do this? I'm able to build llvm-gcc-4.2 x86 natively, but not the powerpc version. Using "--disable-shared --disable-multilib --disable-bootstrap" as additional flags, I've tried: powerpc-linux powerpc64-linux CellSPU-linux as the target, but powerpc* dies with rs6000.c and the CellSPU target wasn't recognized. Setting --with-sysroot didn't help either. Thanks. -- Sunjae Park MS. Georgia Tech College of Computing
On Apr 6, 2008, at 11:24 AM, Sunjae Park wrote:> On Sunday 06 April 2008 06:53:06 am Bill Wendling wrote: >> (snip) >> Hi Sunjae, >> >> You'll need to compile llvm-gcc as a cross-compiler to get it to >> accept altivec intrinsics and PPC-specific flags. >> >> -bw > > Thanks, Bill. I was afraid of that. > > Any pointers on how to do this? I'm able to build llvm-gcc-4.2 x86 > natively, > but not the powerpc version. > Using "--disable-shared --disable-multilib --disable-bootstrap" as > additional > flags, I've tried: > > powerpc-linux > powerpc64-linux > CellSPU-linux > > as the target, but powerpc* dies with rs6000.c and the CellSPU > target wasn't > recognized. Setting --with-sysroot didn't help either. >I haven't tried this before myself. But you may need to set the -- build, --host, and --target flags to their appropriate values. You can run "config.guess" to see an example of what some of those values should be. As for the values for the target machine, I'm not sure how to get those. Check config.guess again to see what it does. -bw
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): 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