If you wish to rebuild the tools from source on your SPARC system running Solaris 2, you can use either the original Solaris 2 native-development binaries from the Cygnus Support Developer's Kit or the unbundled compiler sold separately by Sun.
Beware!You might notice that there is a program called `/usr/ucb/cc' and be tempted to use it. Don't. This program is incompatible with the real compiler, which is in `/opt/SUNWspro/bin/cc'.