From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1EBlEN-00029f-3t for garchives@archives.gentoo.org; Sun, 04 Sep 2005 03:31:43 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j843RsAO001675; Sun, 4 Sep 2005 03:27:54 GMT Received: from smtp.istop.com (smtp.istop.com [66.11.167.126]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j843OL73011577 for ; Sun, 4 Sep 2005 03:24:22 GMT Received: from waltdnes.org (i216-58-14-211.cybersurf.com [216.58.14.211]) by smtp.istop.com (Postfix) with SMTP id AC8002B3CD for ; Sat, 3 Sep 2005 23:27:36 -0400 (EDT) Received: by waltdnes.org (sSMTP sendmail emulation); Sat, 3 Sep 2005 23:27:19 -0400 From: waltdnes@waltdnes.org Date: Sat, 3 Sep 2005 23:27:19 -0400 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] cpu flags / USE flags / compiler flags Message-ID: <20050904032719.GA6185@waltdnes.org> References: <5bdc1c8b05083109046b8ebdf7@mail.gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5bdc1c8b05083109046b8ebdf7@mail.gmail.com> User-Agent: Mutt/1.5.8i X-Archives-Salt: f5cbbc40-5a46-475e-be98-81631d983661 X-Archives-Hash: ff6b3683e1c01df5de91ac1d2e839666 On Wed, Aug 31, 2005 at 09:04:21AM -0700, Mark Knecht wrote > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge > mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid > xtpr [...deletia...] > I then looked for CPU flags that had an equivalent USE flag and that > might be of use for faster graphics. On this machine I chose mmx, sse > & sse2. Armed with that I changed my make.conf file to look like this: There are CPU flags and there are USE flags. Some of them have the same names, and that may confuse you. It works like this... 1) Get a listing of your cpu's flags in /proc/cpuinfo 2) Check against the list of supported flags in gcc for you cpu, and add them to CFLAGS 3) Check http://www.gentoo.org/dyn/use-index.xml for a list of valid USE flags, and include any that show up in /proc/cpuinfo 4) Repeat step 3) with /usr/portage/profiles/use.local.desc for any programs you're emerging. There doesn't seem to be anything special on your pentium4, but my AMD64 not only has mmx and 3dnow, it also has mmxext and 3dnowext. mplayer can take advantage of them. I include them in the /etc/portage/package.use entry for media-video/mplayer. I'll assume that you're using gcc 3.3.5. In that case, the place to look for CPU flag options is... http://gcc.gnu.org/onlinedocs/gcc-3.3.5/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options That list shows pentium4, mmx, sse, and sse2. Also, if you have *ANY* version of sse available, you can improve performance by running floating point math via sse, rather than 387 instructions. I recommend... CFLAGS="-O2 -pipe -fomit-frame-pointer -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse" http://www.gentoo.org/dyn/use-index.xml shows mmx and sse as valid USE flags, so you can include them in USE. -- Walter Dnes My musings on technology and security at http://tech_sec.blog.ca -- gentoo-user@gentoo.org mailing list