So, I got this working, bringing major speedups. Latest distcc release compiles on IRIX and works just fine. Step-by-step-ish guide:
1) Decide where you want to put things, let's call that $PREFIX.
2) Make a tarball from a live IRIX system with dirs /lib32, /usr/lib32 and /usr/include. Unpack this somewhere, let's call that place $IRIX.
3) Take sgug-rse binutils SRPM, unpack, apply the patches, compile to $PREFIX with these options:
4) Do a bit of preliminary setup for building the compiler.
5) Unpack the compiler from sgug-rse SRPM, apply the patch and build it. Preferably use a separate directory for building to make it easier to recover from possible mistakes.
6) Install distcc on the machine running the crosscompiler. The ones from Debian and Ubuntu seem to work, at least.
7) Start up distcc. Here's the script I use for mine, adjust paths, IPs and ports to taste.
8) Compile distcc on IRIX. The build process may require Python to get the include server used by the pump mode working. If this is the case, you could install the one from ports.sgi.sh or compile one with @dexter1's excellent patches. This should be a straightforward build.
9) Set up environment on IRIX box.
10) Build something with
Preprocessing is still done on the SGI side, so this will not be blazingly fast like native cross-compilation is. However, it does help quite a bit. Building bash 4.4 was sped up by close to 70 % on my Octane 2*360 MHz setup.
Have fun!
1) Decide where you want to put things, let's call that $PREFIX.
2) Make a tarball from a live IRIX system with dirs /lib32, /usr/lib32 and /usr/include. Unpack this somewhere, let's call that place $IRIX.
3) Take sgug-rse binutils SRPM, unpack, apply the patches, compile to $PREFIX with these options:
Code:
./configure --prefix=$PREFIX --target=mips-sgi-irix6.5 --disable-werror --with-sysroot=$IRIX
Code:
ln -s $IRIX/usr/lib32 /usr/lib32 # yes, this is ugly, but the paths for the crt*.o are hardcoded in gcc. if you want, you can change them in the source.
ln -s $IRIX/usr/include $PREFIX/mips-sgi-irix6.5/sys-include
Code:
../gcc-9.2.0-20190812/configure --enable-obsolete --disable-multilib --prefix=$PREFIX --target=mips-sgi-irix6.5 --disable-nls --enable-languages=c,c++,lto --disable-libstdcxx --with-build-sysroot=$IRIX --enable-lto --enable-tls=no
7) Start up distcc. Here's the script I use for mine, adjust paths, IPs and ports to taste.
Code:
#!/bin/bash
# this is $PREFIX/mips-sgi-irix6.5/bin - note, if distcc can't run, say, cc, just create symlinks in this dir
# and everything will work
export DISTCCD_PATH=~/irix-crossbuild/mips-sgi-irix6.5/bin
# allow the 100.100.100.0/24 C class to access this - replace with whatever you have at home
distccd --daemon --allow 100.100.100.0/24 -p 8086
9) Set up environment on IRIX box.
Code:
export DISTCC_HOSTS=100.100.100.42:8086 # replace with your IP and port
make -j<x>
where x can be found out by trying. My laptop running the cross-compiler has 4 cores and -j6
seems to produce best results.Preprocessing is still done on the SGI side, so this will not be blazingly fast like native cross-compilation is. However, it does help quite a bit. Building bash 4.4 was sped up by close to 70 % on my Octane 2*360 MHz setup.
Have fun!
Last edited: