[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: stripclub - Online Comic Reader/Archiver

On Fri, Apr 09, 2004 at 02:25:17PM -0600, Wesley J Landaker wrote:
> On Friday 09 April 2004 2:15 pm, elijah wright wrote:
> > >      For the C programming language, this means the following
> > >      compilation parameters should be used:
> > >
> > >           CC = gcc
> > >           CFLAGS = -O2 -g -Wall
> > >
> > > though -O3 is probably OK in most cases.  You should keep the
> > > optimizations options as conservative as possible, unless you
> > > really
> >
> > in my experience compiling stuff with -O3 just means that people on
> > other architectures (where GCC may do odd things) will eventually
> > probably file bugs on your package that can be fixed by moving back
> > to -O2.
> >
> > I've seen this happen on alpha repeatedly, and i seem to recall that
> > sparc and powerpc occasionally have this issue as well.
> Not to disagree--sometimes the optimizations -O3 does have problems on 
> some architectures either because it exposes bugs in the software or 
> because of compiler problems--but it would be more helpful in general 
> to find why -O3 is causing a problem and either 1) fix the offending 
> code if it's the packages problem, or 2) file a bug against GCC so that 
> it can actually get fixed instead of just worked around and ignored. =)
> Granted, if you're not willing to go through the extra effort to do 
> that, -O2 might be a better choice...

Speaking as a spectator on the debian-gcc list, and a porter of one of the
weirder architectures around Debian, the typical life of a "good" bug in
such things is:

1) File against the package for being b0rken
2) Package maintainer reviews code, decides it's GCC that's b0rken
3) Maintainer clones bug, reassigns clone to GCC with explanation and test
   case to reproduce it, and notes on observations. And probably other sorts
   of goodies; see the GCC reporting info.
4) Maintainer works around it with -O2 in the package, and closes the
   origional bug.

Note that going beyond -O2 in just about any version of GCC is *not* a
recommended behavior for a lot of reasons, unless you know exactly what
you're doing, and why, and are willing to keep track of GCC itself and make
sure things don't break. The recommendation in the docs is there for a very
good reason, and most software is never thoroughly tested at -O3 or above
because of the things that involves.

In other words, "yes, GCC should fix known bugs". However, doing so often
takes access to some very skilled folks who are very busy, even with a good
test case, and so the short-term answer to "Doctor, it hurts when I do
this" remains "Don't do that."
Joel Baker <fenton@debian.org>                                        ,''`.
Debian GNU/NetBSD(i386) porter                                       : :' :
                                                                     `. `'

Attachment: pgpiDnpGXDgP7.pgp
Description: PGP signature

Reply to: