Mac Make GCC build x86_64 code on default

Ravernomina

macrumors member
Original poster
Nov 15, 2009
43
0
Hello everyone. As the top says i would like to change the default Architecture from i686 to x86_64 for gcc. Can anyone tell me how to do this? Thanks!
 

rdyornot

macrumors newbie
Sep 15, 2007
24
2

misee

macrumors member
Jul 4, 2010
65
0
Theres also a compiler switch. I think it's -xarch_x86_64 (check the man page for valid architectures). Then, you could create an alias if you compile in your terminal. For bash & co. that would be
Code:
alias gcc_64 gcc -xarch_x86_64
Then you can just type gcc_64 instead of gcc.