Gentoo Archives: gentoo-user

From: Pandu Poluan <Pandu@××××××.info>
To: gentoo-user@l.g.o
Subject: RE: [gentoo-user] CFlags for CPU
Date: Wed, 27 Jul 2011 14:55:00
Message-Id: Z0thlVPNHDcM.j3pbLHQg@mail.poluan.info
1 -original message-
2 Subject: Re: [gentoo-user] CFlags for CPU
3 From: Andy Wilkinson <drukargin@×××××.com>
4 Date: 2011-07-27 21:09
5
6 >Another good trick I've found on the forums is to run:
7 >
8 >$ gcc -### -e -v -march=native /usr/include/stdlib.h
9 >
10 >The last line of output will include the various CFLAGS that
11 >-march=native picks. In my case (Phenom II 955):
12 >
13 > "/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/cc1" "-quiet"
14 >"/usr/include/stdlib.h" "-D_FORTIFY_SOURCE=2" *"-march=amdfam10"
15 >"-mcx16" "-msahf" "-mpopcnt"* "--param" "l1-cache-size=64" "--param"
16 >"l1-cache-line-size=64" "--param" "l2-cache-size=512" "-mtune=amdfam10"
17 >"-quiet" "-dumpbase" "stdlib.h" "-auxbase" "stdlib" "-o"
18 >"/tmp/ccR1PlNZ.s" "--output-pch=/usr/include/stdlib.h.gch"
19 >
20 >I typically use -march=native when I don't need to worry about distcc,
21 >or the options from that output that start with "-m".
22
23 Hey, that's a nice trick! Thanks for re-sharing :)
24
25 That said, I usually *can't* use -march=native because all my Gentoo systems are virtualized servers, running on top of XenServer, which itself runs on heterogenous server boxes (all Intel).
26
27 So, I purposefully limit myself to "-march=nocona".
28
29 (I did raise an explicit point about -march parameter in my Gentoo-Wiki article)
30
31 Rgds,
32 --
33 FdS Pandu E Poluan
34 ~ IT Optimizer ~
35
36 Sent from Nokia E72-1