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!
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.
And as for building the thing...
The 4.0.5F sysroot folder should contain /lib, /usr/include, and /usr/lib.
Configuring binutils:
Now, as for configuring the crosscompiler:
Onre used a native GCC 3.1 for OS X 10.5 to build GCC 3.0.4 targetting 4.0.5F.
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
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
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/
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
Last edited: