Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] cpu flags / USE flags / compiler flags
Date: Sun, 04 Sep 2005 05:23:44
Message-Id: 5bdc1c8b05090322184cfa1075@mail.gmail.com
In Reply to: Re: [gentoo-user] cpu flags / USE flags / compiler flags by waltdnes@waltdnes.org
1 Thanks Walter. That description verifies my guess and gives me a
2 reason to continue looking at the issue.
3
4 I appreciate your help.
5
6 Cheers,
7 Mark
8
9 On 9/3/05, waltdnes@××××××××.org <waltdnes@××××××××.org> wrote:
10 > On Wed, Aug 31, 2005 at 09:04:21AM -0700, Mark Knecht wrote
11 >
12 > > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
13 > > mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid
14 > > xtpr
15 > [...deletia...]
16 > > I then looked for CPU flags that had an equivalent USE flag and that
17 > > might be of use for faster graphics. On this machine I chose mmx, sse
18 > > & sse2. Armed with that I changed my make.conf file to look like this:
19 >
20 > There are CPU flags and there are USE flags. Some of them have the
21 > same names, and that may confuse you. It works like this...
22 > 1) Get a listing of your cpu's flags in /proc/cpuinfo
23 > 2) Check against the list of supported flags in gcc for you cpu, and
24 > add them to CFLAGS
25 > 3) Check http://www.gentoo.org/dyn/use-index.xml for a list of valid
26 > USE flags, and include any that show up in /proc/cpuinfo
27 > 4) Repeat step 3) with /usr/portage/profiles/use.local.desc for any
28 > programs you're emerging. There doesn't seem to be anything
29 > special on your pentium4, but my AMD64 not only has mmx and 3dnow,
30 > it also has mmxext and 3dnowext. mplayer can take advantage of
31 > them. I include them in the /etc/portage/package.use entry for
32 > media-video/mplayer.
33 >
34 > I'll assume that you're using gcc 3.3.5. In that case, the place to
35 > look for CPU flag options is...
36 >
37 > http://gcc.gnu.org/onlinedocs/gcc-3.3.5/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options
38 >
39 > That list shows pentium4, mmx, sse, and sse2. Also, if you have *ANY*
40 > version of sse available, you can improve performance by running floating
41 > point math via sse, rather than 387 instructions. I recommend...
42 >
43 > CFLAGS="-O2 -pipe -fomit-frame-pointer -march=pentium4 -mmmx -msse -msse2 -mfpmath=sse"
44 >
45 > http://www.gentoo.org/dyn/use-index.xml shows mmx and sse as valid USE
46 > flags, so you can include them in USE.
47 >
48 > --
49 > Walter Dnes <waltdnes@××××××××.org>
50 > My musings on technology and security at http://tech_sec.blog.ca
51 > --
52 > gentoo-user@g.o mailing list
53 >
54 >
55
56 --
57 gentoo-user@g.o mailing list