Florian Philipp wrote:
> Am Freitag 20 Juli 2007 20:16 schrieb Kenneth Prugh:
>> Andrew Gaydenko wrote:
>>> I have noticed, the official portage tree has included gcc 4.2. Now for
>>> Core 2 Duo CPU (amd64 Gentoo arch) I use in make.conf file:
>>>
>>> CFLAGS="-O2 -march=nocona -pipe"
>>>
>>> gcc' changelog has this note:
>>>
>>> --------------------
>>> ...
>>> IA-32/x86-64
>>>
>>>     * -mtune=generic can now be used to generate code running well on
>>> common x86 chips. This includes AMD Athlon, AMD Opteron, Intel Pentium-M,
>>> Intel Pentium 4 and Intel Core 2.
>>>     * -mtune=native and -march=native will produce code optimized for the
>>> host architecture as detected using the cpuid instruction.
>>> ...
>>> --------------------
>>>
>>> The question is: must I replace '-march=nocona' with '-mtune=native and
>>> -march=native'?
>> I have a Core2 Duo E6600 and use these CFLAGS with GCC 4.2:
>>
>> CFLAGS="-Os -march=native -mtune=native -fomit-frame-pointer -pipe -mmmx
>> -msse2 -msse3"
>>
>> Native works fine here.
> 
> I don't think that you need -msse3 -msse2 and -mmmx because -march takes care 
> of that (refer to "man gcc", one notable exeption: -march=athlon64 does not 
> pull -msse3 in because not all Athlons support it). 
> -fomit-frame-pointer is unneccessary on AMD64 (refer to "man gcc", again).

Yeah I wasn't exactly positive if it did pull everything in, and
specifying specifically can't really hurt at all as long as you know
it's supported with your cpu.

-- 
Kenneth Prugh - Ken69267
Gentoo AMD64 Arch Tester

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to