[LLVMdev] Trying to compile llvm-gcc to mips

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Mon Jul 7 09:44:14 PDT 2008


Hi Julio,

On Mon, Jul 7, 2008 at 6:53 AM, Julio <julio.martin.hidalgo at gmail.com> wrote:
> And one last thing, the problem seems to be related to libcpp. Using only C
> frontend will work?

The problem is with libgcc2, which contains libcalls needed to support
some operations
your processor cant directly do.

>> Actually, I don't need fp, there is any way to disable?

dunno how to disable

>> By the way, I'm working with a MIPS coprocessor with vectorial
>> reconfigurable units (similar to RSVP). My future work will be autovectorize
>> loops (I've already studied some code in LLVM and doesn seems very
>> difficult, thanks to ScalarEvolution, LoopInfo, etc.). I was wondering about
>> compiling newlib with gcc, compiling my code with llvm, and linking with the
>> traditional ld, OR, compiling newlib with llvm, link my code and newlib (in
>> llvm bitcode), and finally assemble to MIPS binary. With the second way, I
>> could optimize functions like memcpy with vectorial instructions :).

cool :)

>> The problem, is that in newlib there are c code mixed with MIPS assembler.
>> I was wondering if configuring its compilation using llvm-gcc as CC and
>> gnu-as as AS would work (linking the as files finally with ld and the result
>> of the llvm assembler). In this way, with llvm-gcc working with -c and
>> --emit-llvm command-options, would call gnu-as or llvm-as?

with llvm-gcc crosscompiler ready you should have the (mips) gnu-as/ld called
automatically by gcc (as long as they are identified by 'configure')
I haven't tried to compile newlib yet (I'll will in the near feature),
if it breaks
send me the bugs with testcases and I'll try to fix it for you. The mips
BE is still under heavy devel, so I dunno if it will perfectly fit your needs.
Anyway, I can help you with the bugs! :)

-- 
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