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 1QVTU8-0006gb-UJ for garchives@archives.gentoo.org; Sat, 11 Jun 2011 19:04:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 769AB1C0AB for ; Sat, 11 Jun 2011 19:04:40 +0000 (UTC) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by pigeon.gentoo.org (Postfix) with ESMTP id EE3581C029 for ; Sat, 11 Jun 2011 18:20:13 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.messagingengine.com (Postfix) with ESMTP id ADE4720925 for ; Sat, 11 Jun 2011 14:20:13 -0400 (EDT) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 11 Jun 2011 14:20:13 -0400 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=1Pn82Aurf2dwmvgdIbjURN+Z8mw=; b=e2a+Yf83TmREfbQcrsTPAAxNOAvrEk7K3vRmr3Vjp5ZMi/XxAE/uD8b4nSxroRzEWAaXqT3jzJWbB20DACATJjn9H62bVMp6DODJPNA0H6HuN0NtH0qx6Lc3QYMe3gUpzwFuSSifAcBNXGbmpyco/5VP2FkhcxnEFc/no/59Kxg= X-Sasl-enc: Fi6pyLKfBBtK6dyQx4T4QwwvhiLwZLiN60Oahs2peQ6T 1307816413 Received: from [192.168.5.18] (serv.binarywings.net [83.169.5.6]) by mail.messagingengine.com (Postfix) with ESMTPSA id 2B90340713D for ; Sat, 11 Jun 2011 14:20:13 -0400 (EDT) Message-ID: <4DF3B1D2.5060909@binarywings.net> Date: Sat, 11 Jun 2011 20:20:02 +0200 From: Florian Philipp User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110507 Lightning/1.0b3pre Thunderbird/3.1.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 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] "universal" CFLAGS/CXXFLAGS/CHOST for 64bit (AMD64 & EMT64T)? References: <4DF388FC.9010600@gmail.com> In-Reply-To: <4DF388FC.9010600@gmail.com> X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5A743E78D9A5578654289460" X-Archives-Salt: X-Archives-Hash: ada4776fe8c70a3065447998541acb88 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5A743E78D9A5578654289460 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 11.06.2011 17:25, schrieb Jarry: > Hi, > how should I change/set CFLAGS/CXXFLAGS/CHOST if I want to have > system which can be easily migrated between AMD64 and Intel/Core > without recompilation? I have a few virtual servers which I can > not move from one arch to the other, as they have hw-specific > CFLAGS (different host-server hardware, both AMD64 and EM64T): >=20 > I have systems with Athlon64/X2 and Core2Quad, with settings: > CFLAGS=3D"-march=3Dathlon64 -O2 -pipe" > CFLAGS=3D"-march=3Dcore2 -O2 -pipe" > CHOST is always "x86_64-pc-linux-gnu". >=20 > I'm not sure "-mtune=3Dgeneric" is the right solution, because > it would generate code for IA32/AMD64/EM64T (if I understand > gcc manual correctly, for both 32bit as well as 64bit HW). >=20 > What I'm looking for are some generic 64bit settings only for > AMD64/EM64T (not 32bit/IA32) similar as for distros with binary > distributions (i.e. I can download Ubuntu either 32bit or 64bit > version, no other hardware-specific difference). I know with > "universal" 64bit binaries I'm going to loose some pefrormance, > but for me flexibility with migration would overweight this > disadvantage... >=20 > Jarry >=20 Unless you specify -m32, your x86_64 gcc will create generic x86_64 code. That means it will use the common AMD64/EM64T instruction set which also includes SSE2 instructions. Regards, Florian Philipp --------------enig5A743E78D9A5578654289460 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.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3zsdsACgkQqs4uOUlOuU+4IwCdGOLQSGXEsIOyZVz7RLXT3beY FUoAnilGeHFrYQiEOyMOUoXZaaXRQkKT =ohLI -----END PGP SIGNATURE----- --------------enig5A743E78D9A5578654289460--