Please consider a donation to the Higher Intellect project. See or the Donate to Higher Intellect page for more info.

Compiling gcc-3.2.2 for IRIX

From Higher Intellect Wiki
Jump to navigation Jump to search

I discovered a nasty bug with gcc-3.2.1 (g++/C++ specifically) which made it useless for even those running 6.5.18 and up. Yes, once again an issue with the new header structure; a 'configure' option was left off that generates unresolvable errors during C++ compiles.

gcc-3.2.2 was released earlier this month so I decided to take advantage of the situation and repair my gcc-3.2.1 SGI Freeware version. It was pretty easy to get going once I gleaned the proper 'configure' info from the gcc mailing list.

You can use your existing gcc version to bootstrap 3.2.2 (SGI's 3.2.1 will work for this purpose), or MIPSpro if you have it.

To build under IRIX 6.5.18 and up:

Untar and cd to gcc-3.2.2:

./configure --prefix=/usr/freeware --enable-version-specific-runtime-libs --enable-threads --enable-haifa --disable-c-mbchar --disable-shared
   gmake bootstrap

then as root:

gmake install

[Mika:~] neko 105% gcc -v
Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.2.2/specs
Configured with: ./configure --prefix=/usr/freeware --enable-version-specific-runtime-libs --enable-threads --enable-haifa --disable-c-mbchar --disable-shared
Thread model: single
gcc version 3.2.2

To build under IRIX 6.5.17 and below:

Use the same method, just leave off the --disable-c-mbchar switch on the configure line, though leaving it on probably won't hurt anything.

I could package this into a tardist, but of course it would only work with IRIX 6.5.18 and up due to the header differences.