<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">1. Is it possible at all to cross-compile with llvm?<SPAN class="Apple-converted-space"> </SPAN></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Yes, this is possible.  I've cross-compiled from x86 to MIPS using LLVM.  However, the codes I compiled using this technique did not always run correctly.  You may have better luck with PPC.</DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">2. I allready have a gcc cross-compiler for power-pc, do i need this or<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">   </SPAN>does llvm contain its own? How can i tell llvm to use it?</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>LLVM has no MIPS backend, so when I did this, I used the C backend to transform the LLVM bytecode to C, then put the result through a gcc MIPS cross compiler.  LLVM does have a PPC backend, however, so I don't think you need to do this.  I think you want to build llvm-gcc on x86 as a PPC cross compiler, use it to compile to LLVM bytecode, and then use the PPC backend to generate PPC code.  To generate PPC code from foo.bc, you say llc -march=powerpc < foo.c > foo.</DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">3. Is there any howto for doing the cross-compiling? I think i need<SPAN class="Apple-converted-space">     </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">   </SPAN>to compile the gcc-front-end for this task, but i don't know the <SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">   </SPAN>options for the configuration script.</DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Building llvm-gcc as a cross compiler is tricky and not documented.  I'm away from Urbana right now, but when I get back tomorrow I'll take a look at what I did for MIPS and see if I can reconstruct it for you.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Rob</DIV></DIV><BR><DIV> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Robert L. Bocchino Jr.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Ph.D. Student</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">University of Illinois, Urbana-Champaign</FONT></P>  </DIV><BR></BODY></HTML>