public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* 64bit Executable Support on Solaris 9
@ 2002-09-07  1:31 Benjamin Krueger
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Krueger @ 2002-09-07  1:31 UTC (permalink / raw)
  To: gcc-help


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: 64bit Executable Support on Solaris 9
       [not found] <616BE6A276E3714788D2AC35C40CD18D7D2E0A@whale.softwire.co.uk>
@ 2002-09-09  1:00 ` Rupert Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Rupert Wood @ 2002-09-09  1:00 UTC (permalink / raw)
  To: 'Benjamin Krueger'; +Cc: gcc-help

Benjamin Krueger wrote:

> I've recently installed the Sunfreeware gcc 3.2 package on a
> SPARCengine AXi (UltraSPARC-IIi 270MHz) running Solaris 9 
> Generic 64-bit.
:
> /usr/lib/sparcv9/values-Xa.o
:
> All of the above files are ELF 32-bit MSB relocatable SPARC Version 1

This file shouldn't be. I don't have Solaris 9 to play with but it's
definitely 64-bit on Solaris 8. (The CCS one is probably just a symlink
to this.)

I don't see 64-bit Solaris 9 in the gcc-testresults archives but I can't
imagine Sun have changed this. My gut reaction is that someone's been
messing around with your install: maybe copying over the file themselves
because it wasn't there when they tried? See what's in package SUNWarcx
on your install media and/or try reinstalling it.

Sorry that's not much use,
Rup.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-09  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-07  1:31 64bit Executable Support on Solaris 9 Benjamin Krueger
     [not found] <616BE6A276E3714788D2AC35C40CD18D7D2E0A@whale.softwire.co.uk>
2002-09-09  1:00 ` Rupert Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).