installing gcc-3.1 on Irix 6.5.15

I am trying to install gcc-3.1 in an SGI Indigo2 running Irix 6.5.15.

When I try to configure gcc-3.1 I keep getting the following message:

Created "Makefile in gcc/ using "mh-frag"
cc ERROR: cannot exec /usr/lib32/cmplrs/fec
*** The command 'cc -o conftest -g conftest.c' failed
*** You must set the environment variable CC to a working compiler

What does this mean and how do I fix it?

If I ignore this message and type: make bootstrap , I get the error message:

make: 'Makefile' line 1245: Syntax error

What does this mean and how do I fix it?

Mike