Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What gcc options are optimal for AMD64 3200 with 1mb cache
View unanswered posts
View posts from last 24 hours

 
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
amax
Tux's lil' helper
Tux's lil' helper


Joined: 22 Feb 2004
Posts: 76
Location: Russia, Novosibirsk (Silicon Taiga)

PostPosted: Sat Feb 28, 2004 2:14 pm    Post subject: What gcc options are optimal for AMD64 3200 with 1mb cache Reply with quote

Does anybody knows what is optimal keys for latest gcc ?

for C++ code and for C code

maybe for libraries is better use different keys set ?

I use now only -O2 -fPIC

not -O3, b/c I am not sure about code quality of current O3 optimizator in gcc...

What do you think about it all? Should I ride out my "optimization" wishes? :)
Back to top
View user's profile Send private message
CodeHacker84
n00b
n00b


Joined: 22 Jan 2003
Posts: 68
Location: Rapids of Cedar, IA

PostPosted: Sun Feb 29, 2004 5:16 am    Post subject: Reply with quote

I've found that trying to add in too many of those CFLAGS tends to lead to a compile failure...I'm fairly certain that this is due to the current state of code development for the 64-bit platform. There's a bunch of things that need to get done. Who wants to do them? I'm game to learn.
_________________
Athlon64 3200
1GB Corsair PC3200 C2
MSI K8T Neo FIS2R
CoolerMaster WaveMaster (Black)
Antec TruePower 550W
120 GB WD SATA Drive
160 GB WD PATA Drive
54x32x54 CD-R/RW
Dual head: ATI 9800 AiW/LG1720P && Voodoo3 PCI/IBM G40 CRT
Back to top
View user's profile Send private message
Kugelfang
Retired Dev
Retired Dev


Joined: 28 Nov 2003
Posts: 25
Location: Witten, Germany

PostPosted: Sun Feb 29, 2004 1:06 pm    Post subject: Reply with quote

Take a look @ amd64.gentoo.org, there are the technotes for all amd64 processort. You'll read:
Quote:
3.l. Properly Setting CFLAGS

The name of the CPU is "k8", but you don't need to put it as a -march=k8 since there is only one x86-64 CPU out there anyways. GCC version before 3.4 will not recognize -march=k8 and will FAIL if it is set.

There used to be issues with the lack of -fPIC being specified when building shared objects, the reasoning is in this mailing list post: Porting to Hammer -- scan down to "Shared libraries must be compiled with -fPIC". If you find any packages that complain about needing -fPIC to run/link properly, please notify us immediately, as we need to update that package. Please do not specify -fPIC in your global CFLAGS as that is not an acceptable solution and just a workaround.

Please do not add -m32 to your USE flags, as you do not want to compile the system in 32-bit mode, and by default Gentoo does not support compiling 32-bit binaries. Use of the -m64 flag is irrelevant as the compiler defaults to 64-bit mode and could have negative effects on code that may supply -m32 internally to compile 32-bit assembly (such as newer releases of grub will do).

Warning: Never use -0s. This has been known to cause problems.


Personally, I use
Code:
CFLAGS=-O2 -pipe
as do most of the people in #gentoo-amd64. :wink:
Back to top
View user's profile Send private message
tamran
n00b
n00b


Joined: 10 Jan 2004
Posts: 35
Location: Ft. Myers, FL

PostPosted: Sun Feb 29, 2004 8:24 pm    Post subject: Wait for gcc 3.4 Reply with quote

Until the release of gcc 3.4, only use "-O2 -pipe"

After that, there will be a lot more optimization for x86_64

Tamran
_________________
"I wouldn't sell you for a million dollars, nor would I pay two cents for another one just like you."
-Tamran's Grandma
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum