View previous topic :: View next topic |
Author |
Message |
amax Tux's lil' helper
Joined: 22 Feb 2004 Posts: 76 Location: Russia, Novosibirsk (Silicon Taiga)
|
Posted: Sat Feb 28, 2004 2:14 pm Post subject: What gcc options are optimal for AMD64 3200 with 1mb cache |
|
|
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 |
|
|
CodeHacker84 n00b
Joined: 22 Jan 2003 Posts: 68 Location: Rapids of Cedar, IA
|
Posted: Sun Feb 29, 2004 5:16 am Post subject: |
|
|
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 |
|
|
Kugelfang Retired Dev
Joined: 28 Nov 2003 Posts: 25 Location: Witten, Germany
|
Posted: Sun Feb 29, 2004 1:06 pm Post subject: |
|
|
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 as do most of the people in #gentoo-amd64. |
|
Back to top |
|
|
tamran n00b
Joined: 10 Jan 2004 Posts: 35 Location: Ft. Myers, FL
|
Posted: Sun Feb 29, 2004 8:24 pm Post subject: Wait for gcc 3.4 |
|
|
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 |
|
|
|