building VNC 3.3.7 on 64-bit Solaris 9

Dave Love d.love "at" dl.ac.uk
Wed Apr 28 10:15:01 2004


"Peter C. Vernam" <pvernam "at" draper.com> writes:

> I don't want to -- I HAVE to.  The machine is a Sun Fire V240 and,
> when installing Solaris 9, I am not even given the option of installing
> a 32-bit kernel.

That isn't relevant.  You have a default 32-bit userland.

> So I get a 64-bit kernel, and therefore gcc 3.2 does
> 64-bit compiles by default.

Then it's broken the way gcc on Debian SPARC now is.  Has it got some
sort or wrapper?  The kernel being 64-bit isn't relevant and doesn't
affect gcc's default per machine.  The default build on 64-bit Solaris
generates 32-bit code (and that was the same for gcc 3.2):

$ uname -a
SunOS srfs2y 5.9 Generic_112233-11 sun4u sparc SUNW,Sun-Fire-V240
$ gcc --version|head -1
gcc (GCC) 3.3.3
$ >a.c echo "main () {return 0;}"
$ gcc a.c && file a.out
a.out:          ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
$ gcc -m64 a.c && ./a.out && file a.out
a.out:          ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped

> I could try specifying "gcc -m32" to make
> it do 32-bit compiles (although I've never been able to get that to work
> properly), but then I'd have the inverse problem of getting "make World"
> to generate Makefiles that say "CC = gcc -m32 -fpcc-struct-return"
> instead of "CC = gcc -fpcc-struct-return".

If you can't get the makefiles to DTRT, you've got a gcc that's
defaulting to -m64 for some reason, and you want it to default to
-m32, you can edit the `specs' file in the location indicated by
`gcc -v' (assuming the installation isn't broken in other ways).