Gentoo Archives: gentoo-user

From: Kenneth Prugh <ken69267@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] gcc 4.2 and Core 2 Duo
Date: Fri, 20 Jul 2007 19:14:47
Message-Id: 46A10697.8010705@gmail.com
In Reply to: Re: [gentoo-user] gcc 4.2 and Core 2 Duo by Florian Philipp
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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-user] Re: gcc 4.2 and Core 2 Duo Alexander Skwar <listen@×××××××××××××××.name>