Porting LLVM to irix.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting LLVM to irix.

Timothy Baldridge
Greetings!

As part of a compiler project I am working on, I am interested in
porting LLVM to Irix/MIPS. I figure I could start by working with the
bytecode to C translation part of LLVM. However, when I run configure,
llvm is saying that it does not recognize the host I am working with.

Are there any documents about how to port to a new OS/Instruction set?

Thanks,

Timothy

--
"... one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs."    — Robert Firth.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Porting LLVM to irix.

Reid Spencer-2
Hi Timothy,

On Tue, 2006-08-22 at 09:27 -0500, Timothy Baldridge wrote:
> Greetings!
>
> As part of a compiler project I am working on, I am interested in
> porting LLVM to Irix/MIPS.

Great!

>  I figure I could start by working with the
> bytecode to C translation part of LLVM.

Yes, we don't have a MIPS backend (yet) but starting the the C Backend
should work until you want to write the MIPS backend :)

> However, when I run configure,
> llvm is saying that it does not recognize the host I am working with.

Right, its not a supported platform (yet).

>
> Are there any documents about how to port to a new OS/Instruction set?

No, but what you're facing isn't particularly difficult. To get
configure to recognize IRIX as a unix operating system, you need to put
these lines

  *-*-irix*)
    llvm_cv_link_all_option="-Wl,--whole-archive"
    llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
    llvm_cv_os_type="IRIX"
    llvm_cv_platform_type="Unix" ;;

into autoconf/configure.ac at line 109. This will tell LLVM the platform
name, platform type, and some options for the linker (please correct
them if they're not right).

When you've made that change, rebuild the configure script by running
autoconf/AutoRegen.sh and then reconfigure LLVM. It should now recognize
your irix machine and configure it.

Please note that the *-*-irix* pattern must match your target triple. If
"irix" isn't the name of your operating system then change it to
something that does match.

>
> Thanks,
>
> Timothy

No problem.

There might be other things that you need to do after this step.  Just
drop us a line and we'll help.

Reid.

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev