* [gentoo-dev] make.conf optimization flags for k6, athlon
@ 2001-07-13 14:36 Dan Armak
2001-07-13 14:55 ` Daniel Robbins
2001-07-14 18:56 ` Thomas Beaudry
0 siblings, 2 replies; 11+ messages in thread
From: Dan Armak @ 2001-07-13 14:36 UTC (permalink / raw
To: gentoo-dev
Hi all,
In make.conf we specify the optimization CXXFLAGS as follows:
# For Pentium and k6/2 machines
# -----------------------------
#CHOST="i586-pc-linux-gnu"
#CFLAGS="-mpentium -march=pentium -O3 -pipe"
#CXXFLAGS="-mpentium -march=pentium -O3 -pipe"
Why don't we use -march=k6 -mcpu=k6? Wouldn't that allow use of mmx and
3dnow, which a generic pentium doesn't have?
# For PII PIII and Athlon machines
# --------------------------------
#CHOST="i686-pc-linux-gnu"
#CFLAGS="-mpentiumpro -march=pentiumpro -O3 -pipe"
#CXXFLAGS="-mpentiumpro -march=pentiumpro -O3 -pipe"
The same here: I believe (though I'm not sure as I don't have an Athlon) that
the flags -mcpu=athlon -march=athlon might be of use.
Dan Armak
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-13 14:36 [gentoo-dev] make.conf optimization flags for k6, athlon Dan Armak
@ 2001-07-13 14:55 ` Daniel Robbins
2001-07-13 15:00 ` Dan Armak
2001-07-14 18:56 ` Thomas Beaudry
1 sibling, 1 reply; 11+ messages in thread
From: Daniel Robbins @ 2001-07-13 14:55 UTC (permalink / raw
To: gentoo-dev
On Fri, Jul 13, 2001 at 11:35:05PM +0300, Dan Armak wrote:
> Hi all,
>
> In make.conf we specify the optimization CXXFLAGS as follows:
>
> # For Pentium and k6/2 machines
> # -----------------------------
>
> #CHOST="i586-pc-linux-gnu"
> #CFLAGS="-mpentium -march=pentium -O3 -pipe"
> #CXXFLAGS="-mpentium -march=pentium -O3 -pipe"
>
> Why don't we use -march=k6 -mcpu=k6? Wouldn't that allow use of mmx and
> 3dnow, which a generic pentium doesn't have?
-march=k6 will cause the i586 build to *not* run on a Pentium Classic or
MMX, which is why we don't use it. However, just the -mcpu=k6 should work
on anything. Yes, we might want to think about using different optimization
settings for our default builds :) I don't think that an -mathlon option
is available yet; I think that requires the athlon-gcc patches which really
don't seem to be actively developed.
Best Regards,
--
Daniel Robbins <drobbins@gentoo.org>
President/CEO http://www.gentoo.org
Gentoo Technologies, Inc.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-13 14:55 ` Daniel Robbins
@ 2001-07-13 15:00 ` Dan Armak
2001-07-13 15:38 ` Daniel Robbins
0 siblings, 1 reply; 11+ messages in thread
From: Dan Armak @ 2001-07-13 15:00 UTC (permalink / raw
To: gentoo-dev
On Friday 13 July 2001 23:54, you wrote:
> On Fri, Jul 13, 2001 at 11:35:05PM +0300, Dan Armak wrote:
> > Hi all,
> >
> > In make.conf we specify the optimization CXXFLAGS as follows:
> >
> > # For Pentium and k6/2 machines
> > # -----------------------------
> >
> > #CHOST="i586-pc-linux-gnu"
> > #CFLAGS="-mpentium -march=pentium -O3 -pipe"
> > #CXXFLAGS="-mpentium -march=pentium -O3 -pipe"
> >
> > Why don't we use -march=k6 -mcpu=k6? Wouldn't that allow use of mmx and
> > 3dnow, which a generic pentium doesn't have?
>
> -march=k6 will cause the i586 build to *not* run on a Pentium Classic or
> MMX, which is why we don't use it. However, just the -mcpu=k6 should work
> on anything.
I understand that, it reinforces what I said. People who compile from build
snapshots should set more 'exact' optimization settings, and make.conf's
comments should tell them to do so.
For example: I have a k6-2/500. When I first built Gentoo on top of a build
snapshot, I used the make.conf instructions and now hae a system optimized
for a generic pentium (i.e. it doesn't even use MMX). I'm not going to
generate binary tarballs for use on other machines, so I'll now change my
make.conf settings to have -march-k6 -mcpu=k6 and recompile all my packages
for better performance. Doesn't that make sense?
make.conf should tell people this: i.e. that they can compile with better
optimization but lose the ability to run the resulting executable on inferior
CPUs.
Dan Armak
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-13 15:00 ` Dan Armak
@ 2001-07-13 15:38 ` Daniel Robbins
2001-07-14 1:11 ` Dan Armak
0 siblings, 1 reply; 11+ messages in thread
From: Daniel Robbins @ 2001-07-13 15:38 UTC (permalink / raw
To: gentoo-dev
On Fri, Jul 13, 2001 at 11:59:53PM +0300, Dan Armak wrote:
> > -march=k6 will cause the i586 build to *not* run on a Pentium Classic or
> > MMX, which is why we don't use it. However, just the -mcpu=k6 should work
> > on anything.
>
> I understand that, it reinforces what I said. People who compile from build
> snapshots should set more 'exact' optimization settings, and make.conf's
> comments should tell them to do so.
Ah, I misunderstood. I agree. Since you now have CVS access, feel free to add
commented-out K6 optimizations to
/usr/portage/sys-apps/portage/files/1.5/cnf/make.conf :)
Best Regards,
--
Daniel Robbins <drobbins@gentoo.org>
President/CEO http://www.gentoo.org
Gentoo Technologies, Inc.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-13 15:38 ` Daniel Robbins
@ 2001-07-14 1:11 ` Dan Armak
2001-07-14 2:12 ` Daniel Robbins
2001-07-14 3:28 ` Hendrik Visage
0 siblings, 2 replies; 11+ messages in thread
From: Dan Armak @ 2001-07-14 1:11 UTC (permalink / raw
To: gentoo-dev
On Saturday 14 July 2001 00:37, you wrote:
> On Fri, Jul 13, 2001 at 11:59:53PM +0300, Dan Armak wrote:
> > > -march=k6 will cause the i586 build to *not* run on a Pentium Classic
> > > or MMX, which is why we don't use it. However, just the -mcpu=k6
> > > should work on anything.
> >
> > I understand that, it reinforces what I said. People who compile from
> > build snapshots should set more 'exact' optimization settings, and
> > make.conf's comments should tell them to do so.
>
> Ah, I misunderstood. I agree. Since you now have CVS access, feel free to
> add commented-out K6 optimizations to
> /usr/portage/sys-apps/portage/files/1.5/cnf/make.conf :)
>
I added it. I also added an i386 option. Does anyone know why the options
started from 486 initially? Is there a problem in using 386 (with a math
coprocessor)?
Dan Armak
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-14 1:11 ` Dan Armak
@ 2001-07-14 2:12 ` Daniel Robbins
2001-07-14 3:28 ` Hendrik Visage
1 sibling, 0 replies; 11+ messages in thread
From: Daniel Robbins @ 2001-07-14 2:12 UTC (permalink / raw
To: gentoo-dev
On Sat, Jul 14, 2001 at 10:10:09AM +0300, Dan Armak wrote:
> I added it. I also added an i386 option. Does anyone know why the options
> started from 486 initially? Is there a problem in using 386 (with a math
> coprocessor)?
Nope, a 386 should work. However, bzip2 on a 386 is, um, super-slow?
It's horribly slow on a 486; imagine a 386.
--
Daniel Robbins <drobbins@gentoo.org>
President/CEO http://www.gentoo.org
Gentoo Technologies, Inc.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-14 1:11 ` Dan Armak
2001-07-14 2:12 ` Daniel Robbins
@ 2001-07-14 3:28 ` Hendrik Visage
2001-07-14 4:04 ` Dan Armak
1 sibling, 1 reply; 11+ messages in thread
From: Hendrik Visage @ 2001-07-14 3:28 UTC (permalink / raw
To: gentoo-dev
On Sat, Jul 14, 2001 at 10:10:09AM +0300, Dan Armak wrote:
> I added it. I also added an i386 option. Does anyone know why the options
> started from 486 initially? Is there a problem in using 386 (with a math
> coprocessor)?
There are some issues with the i386-i387 connections (Bad Intel decision,
causing us to have one less IRQ available :() and there are also an instruction
or two on the i486 that's not on the i386, especially cache related.
--
------------------------
Hendrik Visage
hvisage@envisage.co.za
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-14 3:28 ` Hendrik Visage
@ 2001-07-14 4:04 ` Dan Armak
0 siblings, 0 replies; 11+ messages in thread
From: Dan Armak @ 2001-07-14 4:04 UTC (permalink / raw
To: gentoo-dev
On Saturday 14 July 2001 12:25, you wrote:
> On Sat, Jul 14, 2001 at 10:10:09AM +0300, Dan Armak wrote:
> > I added it. I also added an i386 option. Does anyone know why the
> > options started from 486 initially? Is there a problem in using 386 (with
> > a math coprocessor)?
>
> There are some issues with the i386-i387 connections (Bad Intel decision,
> causing us to have one less IRQ available :() and there are also an
> instruction or two on the i486 that's not on the i386, especially cache
> related.
But as far as I understand all things properly compiled for the i386 should
work, right?
I don't have a 386. Someone who does might want to test Gentoo on it. Though
cross-compiling to 386 from a faster machine might be a good idea :-)
Dan Armak
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-13 14:36 [gentoo-dev] make.conf optimization flags for k6, athlon Dan Armak
2001-07-13 14:55 ` Daniel Robbins
@ 2001-07-14 18:56 ` Thomas Beaudry
2001-07-15 0:15 ` Dan Armak
1 sibling, 1 reply; 11+ messages in thread
From: Thomas Beaudry @ 2001-07-14 18:56 UTC (permalink / raw
To: gentoo-dev
A few comments I've been meaning to make.
1. According to the GCC documentation you shouldn't be using -m<processor>
any more. It's been depreciated in favor of -mcpu<processor>.
2. You don't need to use -mcpu usually with -march as -march sets -mcpu
for you. I say usually 'cause there's an AMD processor (can't remember
which) that uses a different instruction set than the default set by the
-march it uses.
3. The usage of processor names has been depreciated as well. Should
use i586, etc. instead.
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
> # For Pentium and k6/2 machines
> # -----------------------------
> #CHOST="i586-pc-linux-gnu"
> #CFLAGS="-mpentium -march=pentium -O3 -pipe"
> #CXXFLAGS="-mpentium -march=pentium -O3 -pipe"
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-14 18:56 ` Thomas Beaudry
@ 2001-07-15 0:15 ` Dan Armak
2001-07-15 0:45 ` Thomas Beaudry
0 siblings, 1 reply; 11+ messages in thread
From: Dan Armak @ 2001-07-15 0:15 UTC (permalink / raw
To: gentoo-dev
On Sunday 15 July 2001 03:54, you wrote:
> A few comments I've been meaning to make.
>
> 1. According to the GCC documentation you shouldn't be using -m<processor>
> any more. It's been depreciated in favor of -mcpu<processor>.
I know that. The mpentium etc. flags wre in the originl make.conf, the things
I added were -march=x -mcpu=x. I'll change mpentium for march=pentium if I
haven't already.
>
> 2. You don't need to use -mcpu usually with -march as -march sets -mcpu
> for you. I say usually 'cause there's an AMD processor (can't remember
> which) that uses a different instruction set than the default set by the
> -march it uses.
I think you're wrong. If I say march=i486 mcpu=i586 this means the binary
will run on any 486 or better, but is optimized for the 586.
>
> 3. The usage of processor names has been depreciated as well. Should
> use i586, etc. instead.
For intel processors maybe. However AMD's k6, though a 586, is better than a
Pentium, and the Athlon, though a 686, is better than a Pentium3.
Although it really would be better if gcc allowed for flags of instruction
sets etc. so that you could define your 'custom processor' by saying, use
MMX+3DNow!2+sse. Than we'd know exactly what optimization it was doing.
Dan Armak
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-dev] make.conf optimization flags for k6, athlon
2001-07-15 0:15 ` Dan Armak
@ 2001-07-15 0:45 ` Thomas Beaudry
0 siblings, 0 replies; 11+ messages in thread
From: Thomas Beaudry @ 2001-07-15 0:45 UTC (permalink / raw
To: gentoo-dev
> > A few comments I've been meaning to make.
> >
> > 1. According to the GCC documentation you shouldn't be using
-m<processor>
> > any more. It's been depreciated in favor of -mcpu<processor>.
> I know that. The mpentium etc. flags wre in the originl make.conf, the
things
> I added were -march=x -mcpu=x. I'll change mpentium for march=pentium if
I
> haven't already.
Just making an observation of what I've seen to date. Haven't seen your
additions yet. In fact, I just downloaded them.
> >
> > 2. You don't need to use -mcpu usually with -march as -march sets -mcpu
> > for you. I say usually 'cause there's an AMD processor (can't remember
> > which) that uses a different instruction set than the default set by the
> > -march it uses.
> I think you're wrong. If I say march=i486 mcpu=i586 this means the binary
> will run on any 486 or better, but is optimized for the 586.
You're correct. I had the nagging feeling there was a second exception
but decided I was crazy after thinking about it for a few seconds.
Didn't have the time then to look it up.
> >
> > 3. The usage of processor names has been depreciated as well. Should
> > use i586, etc. instead.
> For intel processors maybe. However AMD's k6, though a 586, is better
than a
> Pentium, and the Athlon, though a 686, is better than a Pentium3.
> Although it really would be better if gcc allowed for flags of
instruction
> sets etc. so that you could define your 'custom processor' by saying, use
> MMX+3DNow!2+sse. Than we'd know exactly what optimization it was doing.
Now arguments there. It really peaves me that it won't use the MMX
extensions on my Pentium 167 +MMX machine.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2001-07-15 6:44 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-13 14:36 [gentoo-dev] make.conf optimization flags for k6, athlon Dan Armak
2001-07-13 14:55 ` Daniel Robbins
2001-07-13 15:00 ` Dan Armak
2001-07-13 15:38 ` Daniel Robbins
2001-07-14 1:11 ` Dan Armak
2001-07-14 2:12 ` Daniel Robbins
2001-07-14 3:28 ` Hendrik Visage
2001-07-14 4:04 ` Dan Armak
2001-07-14 18:56 ` Thomas Beaudry
2001-07-15 0:15 ` Dan Armak
2001-07-15 0:45 ` Thomas Beaudry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox