64bit Executable Support on Solaris 9

Benjamin Krueger benjamin@seattleFenix.net
Sat Sep 7 01:31:00 GMT 2002


I've recently installed the Sunfreeware gcc 3.2 package on a
SPARCengine AXi (UltraSPARC-IIi 270MHz) running Solaris 9 Generic 64-bit. I'd
like to be able to compile 64-bit executables, however compiling even the
following simple code fails to work. Google references to this error and
similar errors vary wildly and as far as I can tell from my limited
programming knowledge, aren't applicable to this problem.

#include <stdio.h>
int main()
{
	printf("Hello, World.\n");
	return -1;
}

# gcc -m32 -o test32 test.c
# ./test32
Hello, World.
# gcc -m64 -o test64 test.c
ld: fatal: file /usr/lib/sparcv9/values-Xa.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to test64
collect2: ld returned 1 exit status
# locate values-Xa.o
/usr/ccs/lib/sparcv9/values-Xa.o
/usr/ccs/lib/values-Xa.o
/usr/lib/sparcv9/values-Xa.o
/usr/lib/values-Xa.o

All of the above files are ELF 32-bit MSB relocatable SPARC Version 1

Is there anything special I should be doing here to create a 64bit executable?
Am I missing something?

Please CC me in replies as I am not subscribed to this list.

Regards,

-- 
Benjamin Krueger

"Everyone has wings, some folks just don't know what they're for"
- B. Banzai
----------------------------------------------------------------
Send mail w/ subject 'send public key' or query for (0x251A4B18)
Fingerprint = A642 F299 C1C1 C828 F186  A851 CFF0 7711 251A 4B18



More information about the Gcc-help mailing list