From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qm5Vk-0003Ak-2u for garchives@archives.gentoo.org; Wed, 27 Jul 2011 14:55:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D58D921C1F3; Wed, 27 Jul 2011 14:54:36 +0000 (UTC) Received: from svr-us4.tirtonadi.com (unknown [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id 2FEAB21C197 for ; Wed, 27 Jul 2011 14:52:59 +0000 (UTC) Received: from [223.255.229.24] (helo=[10.164.87.199]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Qm5Tl-002eA1-O0 for gentoo-user@lists.gentoo.org; Wed, 27 Jul 2011 21:52:58 +0700 From: "Pandu Poluan" To: gentoo-user@lists.gentoo.org Subject: RE: [gentoo-user] CFlags for CPU Date: Wed, 27 Jul 2011 21:52:07 +0700 Message-ID: X-Mailer: EPOC Email Version 2.10 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Language: i-default Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: X-Archives-Hash: 871c144553a6d57d52e8d2c7390e0481 -original message- Subject: Re: [gentoo-user] CFlags for CPU From: Andy Wilkinson Date: 2011-07-27 21:09 >Another good trick I've found on the forums is to run: > >$ gcc -### -e -v -march=3Dnative /usr/include/stdlib.h > >The last line of output will include the various CFLAGS that >-march=3Dnative 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=3D2" *"-march=3Damdfam10" >"-mcx16" "-msahf" "-mpopcnt"* "--param" "l1-cache-size=3D64" = "--param" >"l1-cache-line-size=3D64" "--param" "l2-cache-size=3D512" = "-mtune=3Damdfam10" >"-quiet" "-dumpbase" "stdlib.h" "-auxbase" "stdlib" "-o" >"/tmp/ccR1PlNZ.s" "--output-pch=3D/usr/include/stdlib.h.gch" > >I typically use -march=3Dnative 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=3Dnative 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=3Dnocona". (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