Ways to stop gcc from doing stuff we don't want

Robert Connolly robert at linuxfromscratch.org
Thu Sep 18 16:01:33 PDT 2008

On Thursday September 18 2008 01:56:49 am Mordae wrote:
> On Thursday 18 September 2008 05:45:54 Robert Connolly wrote:
> > While upgrading my desktop I added a couple new things to gcc's specs:
> > *cc1_options:
> > %{O3:%eDon't use -O3} %{march=i486:;:%{march=*:%eDon't set -march}}
> > This causes -O3, and -march={anything but i486}, to stop gcc, because I
> > don't want to use buggy gcc optimizations.
> Hi, no -O3 is nice, but i486? It made like 15% on Xeon... that's a lot.
> Can you point me to some info on these optimization bugs?

I got glibc test errors from -O3 and -mtune=i686. I shouldn't say they're 
buggy options, but gcc constantly has new optimization bugs as optimizations 
get better. While trying to find patches to the glibc test errors I was often 
lead to math bugs in gcc, some of which have not been fixed in the gcc42 
branch. Packages that depend on math precision don't necessarily test it very 
well in their test suite, so I think it's generally safer to use i486 
and -O2.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20080918/d7f7d500/attachment.sig>

More information about the hlfs-dev mailing list