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 30F621381F4 for ; Fri, 17 Aug 2012 18:01:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 834EB21C078; Fri, 17 Aug 2012 18:01:07 +0000 (UTC) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by pigeon.gentoo.org (Postfix) with ESMTP id AA90821C029 for ; Fri, 17 Aug 2012 17:57:41 +0000 (UTC) Received: by vcbfl17 with SMTP id fl17so3451514vcb.40 for ; Fri, 17 Aug 2012 10:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=dkTrgS4wSdx7CHoogzCt9YUUcy2ISx7nILf6vX7y85E=; b=kN7vPV3cv7jTR07Mbz4zlvfTRIzewrk7GFSGoHJ2ncwt1VkCWsY9YcVB06QCTYp+zw Y1GAOwfxWJ1dKcA+pLqU3pMKcsE8h/lMZTjh8jPMWcmIbXvbxxLauXFUVpiGpk+Geit7 vWGH+PlNn1MZLCsGAZZXNsq0jDGc8dvZceRmtFirzONFu/ZorIcaDA5IMvgzHpKxANtp iJZV/MV5sWAUC1NF9DH9pnoA3dkVOwPK8GtlvU7qjYktsMoUGteOtNc0499N606B1H5f m+N6AiPAt6xPrPouNeGZrx6GSBwB1DWO8k6Omv2qhWGBxV4iJIKr7pPSPf/zx6PfKJ7Y +WxA== 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 Received: by 10.52.156.46 with SMTP id wb14mr2676763vdb.30.1345226261165; Fri, 17 Aug 2012 10:57:41 -0700 (PDT) Received: by 10.58.102.228 with HTTP; Fri, 17 Aug 2012 10:57:41 -0700 (PDT) In-Reply-To: <502E4CCA.3070208@binarywings.net> References: <502E4CCA.3070208@binarywings.net> Date: Fri, 17 Aug 2012 18:57:41 +0100 Message-ID: Subject: Re: [gentoo-user] common flags for 2 cpu? From: Jorge Almeida To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 X-Archives-Salt: 7f73e3ba-b629-453a-b625-cf665a764ff4 X-Archives-Hash: d409f968392e39e8b81e38dd0e0b5cc4 On Fri, Aug 17, 2012 at 2:53 PM, Florian Philipp wrote: > Am 17.08.2012 10:58, schrieb Jorge Almeida: >> >> 1) Is this strategy right? If so, any other flags to add? (or any >> flags to remove from the list?) >> >> 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? >> >> TIA >> >> Jorge Almeida >> > > 1) Yes. But as you can see, -march=prescott is basically a subset of > atom. In fact, before there was a -march=atom option, prescott was the > best flag for atoms. I think you can avoid some hassle by simply > enabling "-march=prescott --param l1-cache-line-size=64 --param > l2-cache-size=512". > > 2) Yes, the param flags do not affect compatibility. Using the lower > value will probably be better but this is just an educated guess. > What about: CFLAGS="-O2 -pipe -fomit-frame-pointer -march=prescott -mtune=atom --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=1024" If prescott were exactly a subset of atom, this would yield the best of both worlds. Can it still be safe? I read in http://forums.gentoo.org/viewtopic-t-895104.html : atom Intel Atom CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3 and SSSE3 instruction set support. Does this mean that these flags are pulled by -mtune=atom, or do we need to ask for them explicitly? The WiKi shows how to find which flags are pulled by -march=native, but not the other cases. Thanks Jorge Almeida