Gentoo Archives: gentoo-amd64

From: Volker Armin Hemmann <volker.armin.hemmann@××××××××××××.de>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] CFLAGS question from a AMD64 newbie
Date: Tue, 09 Dec 2008 13:28:32
Message-Id: 200812091428.21434.volker.armin.hemmann@tu-clausthal.de
In Reply to: [gentoo-amd64] CFLAGS question from a AMD64 newbie by "Sami Näätänen"
1 On Dienstag 09 Dezember 2008, Sami Näätänen wrote:
2 > So hi from a amd64 newbie. Not so newbie with Gentoo though. :)
3 >
4 > My system is an Intel quad core core2 with a 2.4 GHz clock speed coupled
5 > with a 4GB of memory. No overclocking etc. Want this to be stable. :)
6 >
7 > I'm just curious what people use as their stable CFLAGS in amd64 Gentoo?
8 > (Sorry if this has been up lately, but I just switched to 64bit env so...)
9 >
10 >
11 > Here is mine and some explanation of why (And I use ~arch system with gcc
12 > 4.3)
13 >
14 > The flags are in order they are used in my CFLAGS and CXXFLAGS.
15 >
16 > Gives stable base
17 > -O2
18
19 yes
20
21 >
22 > Want to optimize for my system, but don't want "native"
23 > -march=core2
24
25 ok
26
27 >
28 > If some ebuilds filter march this will still cache optimize etc for my
29 > system -mtune=core2
30
31 I would scrap that.
32
33 >
34 > Faster floating point math and better chance of vectorization
35 > -mfpmath=sse
36
37 superfluos. March with amd64 sse is used by default.
38
39 >
40 > These because of the march might get filtered
41 > -mmmx -msse -msse2 -msse3 -mssse3
42
43 if march get filtered, these might one of the reasons, I would remove them.
44 >
45 > For loop vectorization
46 > -ftree-vectorize
47
48 scrap that.
49
50
51 > -pipe
52 >
53 once upon a time I used this flags:
54
55 #CFLAGS="-march=k8 -O2 -pipe -fweb -ftracer -fpeel-loops -msse3"
56 and even
57 #CFLAGS="-march=k8 -O2 -fweb -ftracer -fpeel-loops -ftree-vectorize -frename-
58 registers -floop-optimize2 -msse3 -pipe"
59
60 to hunt down a java bug, I recompiled the whole system with:
61
62 CFLAGS="-march=k8 -O2 -msse3 -pipe"
63
64 and surprise - it was as fast as before - and compiling was faster too!

Replies

Subject Author
Re: [gentoo-amd64] CFLAGS question from a AMD64 newbie "Sami Näätänen" <sn.ml@××××××××××××.fi>