From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3B8E11381F4 for ; Fri, 17 Aug 2012 13:55:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 531B621C011; Fri, 17 Aug 2012 13:55:18 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by pigeon.gentoo.org (Postfix) with ESMTP id 410CAE0691 for ; Fri, 17 Aug 2012 13:53:23 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 01F3A20C81 for ; Fri, 17 Aug 2012 09:53:22 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 17 Aug 2012 09:53:22 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=binarywings.net; h=message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=mesmtp; bh=zaZkjgwyHbkerg0hLycBvCUf pP4=; b=fKyuiIP/9+meG1VOT0gXb478ALJxLxjboq7axJUx+2Q3kJqPcRQkzGIu TOkQPfx8Qiu4YrFq4Yponl7QMrePgVFb14DNrRNlwvqjRvtOLRZ6A6uk/7MYluUl cFIrAa3O1E6godxpEwQ0mkADE4P33lDIAzVe3qWRLlYdAj28JvU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type; s=smtpout; bh=zaZk jgwyHbkerg0hLycBvCUfpP4=; b=fk/VB+SsH7u8EozmEVjAAIu1EhqIr48neD12 6dVwjh/9KhIjq5/68ibpQhj+89Sg0VuMXunWVezYHo18jSReVI6DQsKuoVkZzMam Bc1EE/gM+zr1joysAP4jQ8yKHN9h8sb9qSh9tK+N7Gdt3wmCb97aM9qByswbLTSq VhweCcg= X-Sasl-enc: 31i/FRyjaRjG4HvIeoK2xM0QpRcdfopL+IOBIjLGcYxb 1345211602 Received: from [10.216.119.237] (unknown [46.115.53.119]) by mail.messagingengine.com (Postfix) with ESMTPA id CC0CF48260C for ; Fri, 17 Aug 2012 09:53:21 -0400 (EDT) Message-ID: <502E4CCA.3070208@binarywings.net> Date: Fri, 17 Aug 2012 15:53:14 +0200 From: Florian Philipp User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120804 Thunderbird/10.0.6 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 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] common flags for 2 cpu? References: In-Reply-To: X-Enigmail-Version: 1.3.5 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFDC90586B6E51691B1317ED4" X-Archives-Salt: a46d49c8-152e-47b2-a861-51e518ca751a X-Archives-Hash: 5572fa8857d6055b35bcbb2c5ababfe3 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFDC90586B6E51691B1317ED4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 17.08.2012 10:58, schrieb Jorge Almeida: > I'm in need of some expert advise about CFLAGS. I'm going to install > Gentoo in two systems, an Atom 330 and a P4 prescott. Since compiling > lots of stuff in an Atom is less than joyful, I intend to do almost > all compilation on the prescott and produce binary packages to use on > the Atom. So, something like > CFLAGS=3D"-march=3Dnative ..." is out. I know I could set > CFLAGS=3D"-march=3Di686 -O2 -pipe -fomit-frame-pointer", but I would li= ke > to extract a bit more juice from the hw, while still keeping stable > systems. So, I thought of setting CFLAGS for both systems as > -march=3Di686, plus the flags that are pulled by -march=3Dnative in bot= h > systems, plus some other flags: >=20 [...] > > This is what is pulled by -march=3Dnative, using gcc -march=3Dnative -E= -v > - &1 | grep cc1 >=20 > Prescott: > -march=3Dprescott -mno-cx16 -mno-sahf -mno-movbe -mno-aes -mno-pclmul > -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi > -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 > -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=3D1= 6 > --param l1-cache-line-size=3D64 --param l2-cache-size=3D1024 > -mtune=3Dprescott >=20 > Atom: > -march=3Datom -mcx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt > -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 > -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt > -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=3D24 --param > l1-cache-line-size=3D64 --param l2-cache-size=3D512 -mtune=3Datom >=20 [...] > > Some questions: >=20 > 1) Is this strategy right? If so, any other flags to add? (or any > flags to remove from the list?) >=20 > 2) The --param flags are the ones of the computer that will do the > compiling. I'm guessing the produced binaries are compatible with cpu > with different --param flags. Is this right? >=20 > TIA >=20 > Jorge Almeida >=20 1) Yes. But as you can see, -march=3Dprescott is basically a subset of atom. In fact, before there was a -march=3Datom option, prescott was the best flag for atoms. I think you can avoid some hassle by simply enabling "-march=3Dprescott --param l1-cache-line-size=3D64 --param l2-cache-size=3D512". 2) Yes, the param flags do not affect compatibility. Using the lower value will probably be better but this is just an educated guess. Regards, Florian Philipp --------------enigFDC90586B6E51691B1317ED4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlAuTM4ACgkQqs4uOUlOuU/7TgCdEJscmk5RfYmX2v35URq0xVQn FX0An24JndBmDuJ+OPrL8rU7hiotEFrU =f8hT -----END PGP SIGNATURE----- --------------enigFDC90586B6E51691B1317ED4--