If this helps anyone, I was in a similar situation: I needed to install gcc manually in an opensolaris box because I needed to compile the network driver.
What I ended up doing is I downloaded virtualbox, installed opensolaris on a VM which had networking enabled, and then downloaded the package gcc-dev (the command is: pkg install gcc-dev ). Then compiled the driver in the virtualbox VM and finally got the binary to the destination machine via usb. -- This message posted from opensolaris.org