[LLVMdev] cross compiling for Sparc

Jim Grosbach grosbach at apple.com
Mon Dec 7 13:24:24 PST 2009


Hi Fima,

If you're building llvmCore, then it builds a compiler for all targets  
by default. The target is selected at runtime. You can use -mtriple, - 
march and such as options to llc to control which target to emit code  
for.

e.g., to produce an ARM assembly file from a foo.bc bitcode file:
llc -march=arm foo.bc

If you haven't read it already, http://llvm.org/docs/ 
GettingStarted.html has good information which should help. Likewise,  
if you're building the llvm-gcc front end as well as the llvmCore back- 
end, http://llvm.org/docs/GCCFEBuildInstrs.html should help get you  
moving in the right direction.

Regards,
   Jim


On Dec 7, 2009, at 12:48 PM, Fima Rabin wrote:

> Hi all,
>
> I am trying to build a cross compiler for Sparc on x386 host. I  
> tried to run configure with
>
>            configure --enable-targets=sparc
>  or with
>
>            configure --target=sparc
>
> but in both cases I got llvm compiler for x86 target. Is there a way  
> to build a cross compiler
> for Sparc (or ARM)?
>
> Thanks.
>
> -- Fima Rabin
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list