Gentoo Archives: gentoo-user

From: Florian Philipp <f.philipp@××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] gcc 4.2 and Core 2 Duo
Date: Fri, 20 Jul 2007 18:59:31
Message-Id: 200707202047.56288.f.philipp@addcom.de
In Reply to: Re: [gentoo-user] gcc 4.2 and Core 2 Duo by Kenneth Prugh
1 Am Freitag 20 Juli 2007 20:16 schrieb Kenneth Prugh:
2 > Andrew Gaydenko wrote:
3 > > I have noticed, the official portage tree has included gcc 4.2. Now for
4 > > Core 2 Duo CPU (amd64 Gentoo arch) I use in make.conf file:
5 > >
6 > > CFLAGS="-O2 -march=nocona -pipe"
7 > >
8 > > gcc' changelog has this note:
9 > >
10 > > --------------------
11 > > ...
12 > > IA-32/x86-64
13 > >
14 > > * -mtune=generic can now be used to generate code running well on
15 > > common x86 chips. This includes AMD Athlon, AMD Opteron, Intel Pentium-M,
16 > > Intel Pentium 4 and Intel Core 2.
17 > > * -mtune=native and -march=native will produce code optimized for the
18 > > host architecture as detected using the cpuid instruction.
19 > > ...
20 > > --------------------
21 > >
22 > > The question is: must I replace '-march=nocona' with '-mtune=native and
23 > > -march=native'?
24 >
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).

Replies

Subject Author
Re: [gentoo-user] gcc 4.2 and Core 2 Duo Kenneth Prugh <ken69267@×××××.com>