[LLVMdev] LLVM for crosscompiling?

Bill Wendling isanbard at gmail.com
Sun Apr 6 03:53:06 PDT 2008


On Apr 5, 2008, at 3:31 PM, Sunjae Park wrote:
> Hi, I am trying to use LLVM on x86 with some code intended for another
> architecture (IBM Cell). The plan is:
>
> 1. foreach $c_files
>       llvm-gcc -emit-llvm -c -o $bc_file $c_file
> 2. link $bc_files
> 3. run my passes with 'opt'
> 4. llc -march=c
> 5. cell_cc
>
> The original code is for the Cell, and uses altivec intrinsics.  
> However,
> llvm-gcc complains about not recognizing them. I read that there is
> an -maltivec flag for the LLVM PowerPC backend, but my version of  
> llvm-gcc
> complains about this "unrecognized command line option." Any hints?
>
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




More information about the llvm-dev mailing list