Compiler questions ??

Hi Gurus,

I am back again with a similar kind of question.

I have a Sun Firex4100 server. I found that it has a 64bit X86 processor using below commands:

 
[!]root: isainfo -kv
64-bit amd64 kernel modules

I had installed Sun Studio 12 in this server long back for my development team.
When i compile am able to get only 32 bit executables.
[!]root: cat hello.c
#include <stdio.h>
void main()
{
printf("Hello World");
}
[!]root: cc hello.c -o /tmp/hello.o
@ /users/e1011605
[!]root: file /tmp/hello.o
/tmp/hello.o: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped

How do i compile 64bit modules using the compiler?

Install Directory - /opt/sunstudio12.1/bin
OS - Sol-5.10
Processor - X86
Hardware - Sunfire x4100.

Thanks
HG

---------- Post updated at 09:22 AM ---------- Previous update was at 09:20 AM ----------

Sorry Guru's,

I found the answer.

[!]root: cc hello.c -m64 -o /tmp/hello.o
 @ /users/e1011605
[!]root: file /tmp/hello.o
/tmp/hello.o:   ELF 64-bit LSB executable AMD64 Version 1 [SSE FXSR FPU], dynamically linked, not stripped

Sorry to disturb.

HG

:smiley: Good job!

I always love it when I'm able to find answers on my own. But sometimes, that's just not enough.