You need to compile the gcc cross compiler. The first step is to download the source code for gcc, bin-utils (gnu as, ld, etc.) and the standard library for the platform.
Once you have the necessary source code (s), you need to configure, create, and then install the cross-compiler without merging your gcc host.
./configure --target=$TARGET --prefix=$PREFIX make make install
Rinse and repeat for bin-utils. I believe that you will need to pass the source location for the standard library to configure, but I do not know what the argument is. I just did it for dev OS where you really don't need it. Take a look at newlib if you are having problems with this.
$ TARGET is obviously the target platform, for you it will be a string such as sparc-elf or sparc64-elf, but it depends.
$ PREFIX is where your cross-compiler will be located. It will be called something like $ TARGET-gcc. So this is optional, just make sure it ends in your path.
http://www.netgull.com/gcc/releases/gcc-4.6.2/
http://ftp.gnu.org/gnu/binutils/
http://sourceware.org/newlib/
source share