Hammer on snapshot cd's
Aggelos Economopoulos
aoiko at cc.ece.ntua.gr
Wed Jul 16 03:29:00 PDT 2008
On Wednesday 16 July 2008, Sepherosa Ziehau wrote:
> On Wed, Jul 16, 2008 at 4:41 PM, Simon 'corecode' Schubert >> No,
> we will always stick to -O. GCC is a moving target too, even if
> >> -O2 works now there is a high chance it will break something in future
> >> GCC rolls.
> >
> > Why should -O2 break things and -O never break things? That doesn't seem
> > obvious to me. I think all the breakages that happened in the last couple
> > of years which were connected with optimization happened with -O, -O2 and
> > -Os.
> >
> > There seems to be a traditional, irrational fear of -O2 in the FreeBSD
> > community, which I can't explain. I've heard something about -O2 and inline
> > assembly, but that's probably old as well.
>
> I think it something about accessing (or dereferencing) unaligned
> fields in a union.
Can you provide a specific example? I mean, for a compiler that almost
everybody in the bsd community thinks is broken on -O2, we have very
little evidence (or rather, no evidence, only rumours) that it breaks
valid code. On the other hand we have a ton of evidence that it works
for other projects.
Let me spread another rumour: I suspect this "fear" is because people have
gotten broken kernels with -O2 which simply means that a) gcc produces bad
code OR b) our codebase has inherited lots of code that assumes a dumb
compiler and gcc is not *that* dumb anymore. Both can be true of course,
but guess which one I think is more likely to account for broken kernels.
Aggelos
More information about the Users
mailing list