gcc compiler options for 64bit

Discussion of chess software programming and technical issues.

Moderator: Ras

krazyken

gcc compiler options for 64bit

Post by krazyken »

I've upgraded my computer, and now have Xeon Harpertown type processor, and was wondering if someone could clue me in on what options I can pass to gcc 4.0.1(apple) to optimize for this.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: gcc compiler options for 64bit

Post by sje »

Are you using Xcode, or are you using handcrafted command line options?

I suggest the former and enabling the 64 bit instruction option. The (rough) command line option equivalent is "-m64".

See "man gcc" for further information.
User avatar
Roman Hartmann
Posts: 295
Joined: Wed Mar 08, 2006 8:29 pm

Re: gcc compiler options for 64bit

Post by Roman Hartmann »

I'm using something like 'gcc -O2 -arch x86_64 *.c' to make use of the 64-bit.
Even though my program isn't optimized for 64-bit (no bitboard-design) it takes advantage of the 64-bit compile and runs about 20% faster than the 32-bit version.

Roman