make errors - solved

Tomislav Greguric greguric at
Tue Jul 4 11:37:33 PDT 2000

Hi Collins!

On Tue, 04 Jul 2000, Collins Richey wrote:

> > > > It turns out that my K6/2 works fine as i686 for some installs,
> > > > but not for bash or gcc.  I'm now using -O3 -mcpu=i586
> > > > -march=i586 and life is better.  
> > > 
> > > Why not use -O3 -mcpu=k6 -march=k6?
> > 
> > neither one...
> > 
> > For an AMD-K6-2 use "-march=pentium -mpentiumpro", as it has an
> > Pentium compatible instruction set (except 3DNow!) and similar
> > scheduling like a Pentium Pro, AFAIK.
> > 
> > The "-march=k6" would slow down the execution time of programs and
> > "-march=i686" may generate unknown instructions for the K6/2.
> My machine must be strange.  I tried this before I switched to
> i586, but when I went to the chroot environment, ls and other
> but not all fileutils commands produced "illegal instruction". 
> I fixed this by redo with i586 as the type.

Strange... because `pentium' is a synonym for `i586'. So with
"-march=<CPU>" and <CPU> being `pentium' or `i586' the compiler
generates absolute identical code which runs on Pentium-class CPUs and
therefore shouldn't generate illegal instructions for the K6/2.

The "-m<CPU>" - the short for "-mcpu=<CPU>" - changes just the aligned
of the generated code to be the best for <CPU>, but does not generate
specific instructions for that <CPU>.

This way, one may even create code which should run on any ix86
processor, but nevertheless be a little bit tuned for speed for
Pentium class CPUs (I believe they are still in majority out there):
"-march=i386 -mcpu=pentium".

Maybe you have made a typo and said "-march=pentium -march=pentiumpro"
instead of the second option being only "-mpentiumpro"?

Also make sure to use the options in this order and not the way round,
because a "-march=pentium" implicitly sets "-mpentium" and therefore
any changes in scheduling should be done *after* "-march".

> Collins


Mail archive:
IRC access: server: port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list