[LLVMdev] Trying to compile llvm-gcc to mips

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Sun Jul 6 11:01:10 PDT 2008


Hi Julio,

On Sun, Jul 6, 2008 at 1:58 PM, Julio <julio.martin.hidalgo at gmail.com> wrote:
> Hello, I'm trying to compile llvm-gcc to crosscompile mips. I have already
> modified a config.gcc to add mips as a target with llvm, but it gives me
> "Did not get a target machine!" (from llvm-backend.cpp).
>
> I thought that I had to modify TargetMachOWriterInfo.h with MIPS info, but
> now the problem is that I don't know where can I get the <mach/machine.h> (I
> don't have it in /usr/include).
>
> Any suggestions?

Are you using the llvm-gcc top-of-tree(TOT) ? the TOT contains mips crosscompile
support, btw, you wont be able to pass through libgcc fp compile, which is what
I'm working right now.
What I suggest is that you begin the cross-compilation using llvm-gcc TOT, and
when it breaks, use cc1 directly to emit llvm bytecode specific for mips. Then,
use llc.
If you have doubts, just ask :)

-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc
"When faced with untenable alternatives, you
 should consider your imperative."



More information about the llvm-dev mailing list