Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Systems Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

On This Page

[Help]

  

Quick Links

Top Level

Related Links

Ask OLC a question

Athena Consulting Homepage

Helpdesk Stock Answers (for Mac/PC questions)


What COMPILERs are on the SGI

The native Silicon Graphics C compiler "cc", is the best compiler to use
for the SGI workstations.  It is custom-tailored for the SGI's.

By default, "cc" behaves as if the option "-xansi" were set on the
command line.  Other available options include:

        -cckr           traditional K&R C
        -ansi           ANSI/ISO C
        -xansi          ANSI/ISO C with same defines as -cckr
        -ansiposix      ANSI/ISO C and POSIX compliance

The highest level of optimization is specified with the "-O3" flag.  You
may also want to use the "-mips2" option, which generates code using the
MIPS 2 instruction set (MIPS 1 plus R4000-specific extensions).  For
more information about the MIPS 2 instruction set, and the
/usr/lib/mips2 libraries, see the "mips2 (5)" manual page:

        athena%  man 5 mips2

Note that Irix is an SVR4-based operating system (as opposed to s
BSD-based operating systems), so your source code should be modified to
deal with this.

If you really want to use "gcc" (the GNU C Compiler) on the SGI's, it is
available in the "gnu" locker:

        athena%  add gnu
        athena%  gcc filename.c

C++ compilers:

    AT&T's CC compiler is not available for the SGI's, but g++ is
    available from the "gnu" locker.

For the SGI's, these symbols are defined:

        sgi
        mips
        unix

and you may also want to use:

        _SVR4_SOURCE
        _SGI_SOURCE

You can get a list of the default options by using "cc -v filename.c" or
"gcc -v filename.c".

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.