1 |
Florian Philipp wrote: |
2 |
> Am Freitag 20 Juli 2007 20:16 schrieb Kenneth Prugh: |
3 |
>> Andrew Gaydenko wrote: |
4 |
>>> I have noticed, the official portage tree has included gcc 4.2. Now for |
5 |
>>> Core 2 Duo CPU (amd64 Gentoo arch) I use in make.conf file: |
6 |
>>> |
7 |
>>> CFLAGS="-O2 -march=nocona -pipe" |
8 |
>>> |
9 |
>>> gcc' changelog has this note: |
10 |
>>> |
11 |
>>> -------------------- |
12 |
>>> ... |
13 |
>>> IA-32/x86-64 |
14 |
>>> |
15 |
>>> * -mtune=generic can now be used to generate code running well on |
16 |
>>> common x86 chips. This includes AMD Athlon, AMD Opteron, Intel Pentium-M, |
17 |
>>> Intel Pentium 4 and Intel Core 2. |
18 |
>>> * -mtune=native and -march=native will produce code optimized for the |
19 |
>>> host architecture as detected using the cpuid instruction. |
20 |
>>> ... |
21 |
>>> -------------------- |
22 |
>>> |
23 |
>>> The question is: must I replace '-march=nocona' with '-mtune=native and |
24 |
>>> -march=native'? |
25 |
>> I have a Core2 Duo E6600 and use these CFLAGS with GCC 4.2: |
26 |
>> |
27 |
>> CFLAGS="-Os -march=native -mtune=native -fomit-frame-pointer -pipe -mmmx |
28 |
>> -msse2 -msse3" |
29 |
>> |
30 |
>> Native works fine here. |
31 |
> |
32 |
> I don't think that you need -msse3 -msse2 and -mmmx because -march takes care |
33 |
> of that (refer to "man gcc", one notable exeption: -march=athlon64 does not |
34 |
> pull -msse3 in because not all Athlons support it). |
35 |
> -fomit-frame-pointer is unneccessary on AMD64 (refer to "man gcc", again). |
36 |
|
37 |
Yeah I wasn't exactly positive if it did pull everything in, and |
38 |
specifying specifically can't really hurt at all as long as you know |
39 |
it's supported with your cpu. |
40 |
|
41 |
-- |
42 |
Kenneth Prugh - Ken69267 |
43 |
Gentoo AMD64 Arch Tester |