LCC for SGI N32

December 2007

I won't be doing any more work on lcc for SGI. I tried extending the compiler to properly handle the full SGI ABI, including long long (64 bit) integers, but it would not be possible without some major internal changes to lcc itself.

I now believe a port of the LLVM (Low Level Virtual Machine) to IRIX would be a better option. LLVM is a more modern design under active development, and includes C++ as well as C support.


Download the LCC-4.1.8-beta executable in SGI tardist installer format. For those interested in compiler design and LCC in particular, here is the full source.

Requires the SGI Developer Foundation that ships with IRIX 6.X

Most recent update: 1 Oct 2002.

This is LCC 4.1.8 with a new back end for the SGI N32 ABI and using the standard SGI development environment.

What's Different?

Previous versions of LCC created O32 code and had to use their own headers. This version

What it doesn't do:

The N32 back end requires an incompatible change to the standard LCC interface record, which is why the compiler is hosted here instead of being a contribution to the full LCC distribution. Briefly, wants_callb for N32 is 'maybe' depending on the size of the structure being returned, so has to be a function that evaluates each use rather than a simple boolean.

Installation

Via the SGI software manager. Since this is the first time I've tried distributing in this format, there may be some problems. If so, please email me.
Known problem: cpp and rcc are installed without execute permissions :-( First time lcc runs it will tell you that it can't execute cpp and in which directory they can be found.

The compiler is built for installation in /usr/freeware/. If you move it elsewhere, remember to set environment variable LCCDIR to the new location.

Usage: you should be able to build ANSI C programs for IRIX by just setting CC=lcc. It uses the standard SGI assembler, linker, and runtime C lib.

Please report any code generation bugs, with code sample attached where possible, to Hugh.Fisher@anu.edu.au

Acknowledgements

Chris Fraser and David Hanson of course, for creating LCC and help during development of the N32 backend.

Nelson Beebe for the 4.1.8 release and help during development.

Dominic Sweetman for the book See MIPS Run

The author(s) of the MIPSpro N32 ABI Handbook.