I have gcc 4.1.1 installed. Maybe you have an older version. If so, this might not apply to you.
I am not familiar with the options you mentioned, but the v9 is definitely SPARC architecture specific. Using "-m64" will produce code for the 64-bit platform, which would be the default anyway. ints will be 32 bits, and pointers and longs will be 64-bits. You could use -mabi=32 will generate 32-bit code for your 64-bit platform. This might result in an inability to link against 64-bit libraries, but if you have 32-bit libraries also installed, it should work. You can do something similar with "-mlong32", which forces all longs and pointer types to 32 bits (but still uses the 64-bit abi so it could run on a 64 bit platform). It might be possible to combine -mlong-calls with this to ensure proper behavior with the linker, but that's just a WAG (wild ass guess).
I thought there was a way to tell the compiler to treat an "int" as 64-bits, but I cannot find an option for that in the manual. You can always use the preprocessor to try to change "int" into "long", but that might not work in some instances.
I found some links that might help:
http://gcc.fyxm.net/summit/2003/Port...2064%20bit.pdf
This link specifically says you must use gcc 4 and later, and mentions a few options pertinent to your task.
64-Bit Transition Guide: Compiling 64-Bit Code Using GCC