Things like yer gcc can be had by installing the Software COmpanion. This CD has a huggy-feely GUI install, and will put your freeware under /opt/sfw ... of course, as mentioned in this thread, sites like Sunfreeware have more packages that generally install in /usr/local
in reply to Is anyone using Solaris 8?
The problem I see you having is that modules that use XS will harf when being built because it's expecting Sun's compiler. I had to tweak my Config.pm (/usr/perl5/5.00503/i866pc-solaris/Config.pm in my case) to get gcc to be the compiler, get "-fPIC" to be the way we build position-independent code, etc... after that, modules needing XS seemed to compile properly.
Update: I should note that I'm assuming you're using the perl that comes with Solaris 8. If you install any other version, YMMV here.
Me spell chucker work grate. Need grandma chicken.