Building the gmp library was failing with peculiar ELF class errors. Ok - the GMP web page says to do make GMP_LDFLAGS="-Wc,-m64". No problem - I do it and everything builds fine.
Then I try to install Math::GMP. No problem, right? Wrong. More ELF class errors. Seems I built Perl as a 32 bit app and I just built libgmp as a 64 bit app. Oops.
No problem. I'll rebuild Perl as a 64 bit app. No problem, right? Wrong. I get miniperl errors of some kind related to building with gcc on the Sparc platform (from what little I can gather from Google).
No problem. I rebuild gmp again but set the ABI environment variable to 32 and pass "-m32" to make instead.
Bingo! And that, boys and girls, is your Solaris 9 lesson for the day.