-original message-
Subject: Re: [gentoo-user] CFlags for CPU
From: Andy Wilkinson <[email protected]>
Date: 2011-07-27 21:09

>Another good trick I've found on the forums is to run:
>
>$ gcc -### -e -v -march=native /usr/include/stdlib.h
>
>The last line of output will include the various CFLAGS that
>-march=native picks.  In my case (Phenom II 955):
>
> "/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/cc1" "-quiet"
>"/usr/include/stdlib.h" "-D_FORTIFY_SOURCE=2" *"-march=amdfam10"
>"-mcx16" "-msahf" "-mpopcnt"* "--param" "l1-cache-size=64" "--param"
>"l1-cache-line-size=64" "--param" "l2-cache-size=512" "-mtune=amdfam10"
>"-quiet" "-dumpbase" "stdlib.h" "-auxbase" "stdlib" "-o"
>"/tmp/ccR1PlNZ.s" "--output-pch=/usr/include/stdlib.h.gch"
>
>I typically use -march=native when I don't need to worry about distcc,
>or the options from that output that start with "-m".

Hey, that's a nice trick! Thanks for re-sharing :)

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).

So, I purposefully limit myself to "-march=nocona".

(I did raise an explicit point about -march parameter in my Gentoo-Wiki article)

Rgds,
--
FdS Pandu E Poluan
~ IT Optimizer ~

Sent from Nokia E72-1


Reply via email to