Getting GCC to compile 64bit code

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pskyboy

Getting GCC to compile 64bit code

Post by pskyboy »

Hey Guys

I was just wondering if anyone new how to get GCC to compile to x86-64 for rather then IA32 is it a command line switch.

Peter
pini

Re:Getting GCC to compile 64bit code

Post by pini »

Try '-m64' to compile 64 bit code and '-m32' to compile 32 bit code
pskyboy

Re:Getting GCC to compile 64bit code

Post by pskyboy »

Okay cheers, that seems to work

Peter
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:Getting GCC to compile 64bit code

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 8:30 pm, edited 1 time in total.
pskyboy

Re:Getting GCC to compile 64bit code

Post by pskyboy »

32bit code runs on 32bit processors (Athlon, P4 etc), 64bit code runs on the new 64bit processors in this case Hammer (x86-64).


Peter
Post Reply