> I need to build 64 bit drivers for Solaris 8 Sparc. I have GCC 2.95.3
> installed. Will GCC build a 64 bit driver? I looked in the GCC source
> tree, but I could not find any documentation on GCC compiler flags. I
> also have a Forte C 6 compiler that I have not installed. Does the
> Forte C build 64 bit drivers?
gcc 2.95.3 compiling for sparcv9 (64-bit) should do the trick. gcc
3.0.1 can do it for sure. I don't recall whether or not the sparcv9
support in 2.95.3 was "mature" enough, my gut feeling is that it wasn't.
In either case, you need a compiler that generates sparcv9 code: either
a sparcv9 compiler, or a bi-arch compiler. If you have the bi-arch
variant, you will need to specify "-m64" to request the 64-bit sparcv9
You will also need to specify "-ffreestanding" which informs gcc that it
is building for a freestanding, rather than standard, environment. The
compiler sometimes makes assumptions (especially with optimizations on)
that are not true in a freestanding environment. For example, the
certain optimizations use standard C library functions that are not
available in the kernel.
And, for those of you that are curious, this will work even if gcc is
using the GNU binutils variants of as and ld instead of the Solaris
variants in /usr/ccs.