Can I generate two binaries (one 32-bit and one 64-bit) from a single source file?
Yes. The Solaris compilers have compile-time flags that can create a resulting object file that is 32-bit or 64-bit. Both the 32-bit and the 64-bit portions of the system, including the kernel and libraries, are built from the same source files. 64-bit specific code in the header files and source files are defined using #ifdef as appropriate to support the single source file for both 32-bit and 64-bit.