IRIX 4.0.5F crosscompilation adventures

LarBob

Administrator
Feb 8, 2019
28
10
3
Onre and I have been on a journey to crosscompile some cozy little ECOFF executables for our friend 4.0.5F. I have come back to report... success!

Code:
rose:~ larbob$ file /usr/iriscc/local/bin/mips-sgi-irix4-gcc
/usr/iriscc/local/bin/mips-sgi-irix4-gcc: Mach-O executable ppc
rose:~ larbob$ /usr/iriscc/local/bin/mips-sgi-irix4-gcc --version
3.0.4
Onre was able to get GCC 3.0.4 targetting mips-sgi-irix4 built!

We started on my Power Mac G5 for $REASONS, but that was generating a lot of heat in my room, so I found my old copy of Snow Leopard server and installed it on a 2009 MacBook Pro I had lying around. Now we're running a GCC that targets IRIX 4.0.5F and that was compiled for Mac OS X 10.5 PPC on Mac OS X 10.6 x86_64 thanks to the wonders of Rosetta (thanks, Transitive Corporation!).

So far, I've compiled older versions of zsh, gzip, and grep, and they all work fine on my R3k Indigo.

Code:
rose:~ larbob$ file /iris/usr/local/bin/zsh
/iris/usr/local/bin/zsh: MIPSEB ECOFF executable (paged) not stripped - version 2.40
Code:
dionysus% echo $0
./zsh
dionysus% printf "hi\nhello\nhey" > test
dionysus% ./grep -R "hey" .
./test:hey
dionysus% ./gunzip
gunzip: compressed data not read from a terminal. Use -f to force decompression.
For help, type: gunzip -h
And as for building the thing...

The 4.0.5F sysroot folder should contain /lib, /usr/include, and /usr/lib.

Configuring binutils:
Code:
../binutils-2.18/configure --prefix=$HOME/local --target=mips-sgi-irix4 --with-build-sysroot=$HOME/sysroots/irix-4.0.5/
Now, as for configuring the crosscompiler:
Code:
export CC="gcc-3.1 -std=c89"
../gcc-3.0.4/configure --enable-obsolete --prefix=$HOME/local --target=mips-sgi-irix4 --disable-nls --enable-languages=c --with-build-sysroot=$HOME/sysroots/irix-4.0.5 --enable-tls=no --with-stabs --with-gnu-as --with-gnu-ld --with-as=$HOME/local/bin/mips-sgi-irix4-as --with-ld=$HOME/local/bin/mips-sgi-irix4-ld
Onre used a native GCC 3.1 for OS X 10.5 to build GCC 3.0.4 targetting 4.0.5F.
 
Last edited:
  • Like
Reactions: Elf and Northsky

Elf

Storybook
Feb 4, 2019
252
57
28
That's awesome! I need to try IRIX 4.0.5 sometime, especially given the number of Indigo 1s I have sitting around. Very curious how it compares to 5.3. Cross-compiling almost seems necessary at this point given CPU speed and RAM restrictions and the size of "modern" software.
 

LarBob

Administrator
Feb 8, 2019
28
10
3
That's awesome! I need to try IRIX 4.0.5 sometime, especially given the number of Indigo 1s I have sitting around. Very curious how it compares to 5.3. Cross-compiling almost seems necessary at this point given CPU speed and RAM restrictions and the size of "modern" software.
Yeah, I'm building GCC 3.0.4 on the machine right now and it's taking quite a bit of time. :D

It'd be nice to have a multi CPU machine that can run 4.x as well.
 
  • Like
Reactions: Elf

massiverobot

irix detailer
Feb 8, 2019
73
47
18
Philly
twitter.com
What are the multi-cpu options for 4.x ? The crimson was single CPU only... what other big SGI was there at this time?

I'm def intererested in this for my Personal Iris running 4f. Nice work!
 

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu