Compiling the compiler – GNU toolchain on Solaris 7

The last couple of days, having configured the pre-installed copy of Solaris 7 on the Ultra 5 I’ve been looking to get enough of the GNU toolchain on the box to allow me to compile SIMH successfully.

In the past, when I had the Tadpole Sparcstation and I’d installed Solaris 2.6 I retrieve binary packages from SunFreeware. However, since that time the service has been locked down to paying customers only, and I don’t know about you but it just feels wrong to be paying for GNU software, compiled or not.

My quest for alterative binary packages for Solaris 7 was through a very bleak land until after hours of searching I knocked on the door of ibiblio. The coverage of all tools and applications isn’t fantastic but there was enough there to enable me to boostrap my own compilations.

After installing gcc, autoconf, make and m4 I was able to start compiling more modern versions. First stop was GCC. I started with the latest, 4.7.1, but had no joy: ‘target platform sparc-sun-solaris2.7 not supported‘. After more searching it became clear that the best initial bet was gcc-3.2.3 as this could be build with gcc-2.9.5 – later versions had trouble.

Sun Type 5 keyboard

Building gcc is fairly straightforward, the main thing is to use the –enable-languages=c,c++,fortran switch so that I didn’t start building Objective C, Ada, Java etc. I’ve also built newer versions of some of the other essential tools including autoconf, awk, bash, bison, bzip2, awk, flex, make, tar, gzip, m4, nedit, perl and wget. This is not a requirement when you use any modern linux distro, but I’ve done it so many times in the past and it does make you appreciate how much code there is in even the lowest level of utilities (e.g, the latest version of GCC is a cool 1GB of source code!)

Ultra 5's Seagate IDE Hard Drive

I then downloaded the latest version of GCC in the -3 branch, gcc 3.6.3 and am now attempting to compile that with version 3.2.3. The builds are a good few hours each! The IDE hard disk is taking a bit of a hammering and apparently the chipset is such a poor choice in the Ultra 5 that only programmed mode and not DMA mode is supported resulting in a 20% CPU overhead for disk access! All is not lost as I’ve been promised a PCI SCSI card which will rid me of the poor performance.

The nice thing about the IDE hard drive is that it lets you know its working – no noticable spin noise once it is up to speed but the head movement can be quite musical at times:

 

So what is the plan? Well, I almost didn’t start down this route because I’m planning on installing Solaris 9 on a SCSI disk when I get the PCI SCSI card. Why bother with this? I believe I can do the retrocomputing community a service by providing the GNU utility binaries for Solaris 2.7 when I have finished – it should save some considerable time now that freeware is no longer free.