Compilation failure in wine-1.1.44

Ben Klein shacklein at
Sat May 8 22:09:12 CDT 2010

On 9 May 2010 06:21,  <wylda at> wrote:
> Hi Marcus,
>> > * better backtraces for bug reports
>> -O2 works like a charm there too, at least for me.
> I think i read that somewhere and if i understood that correctly, my
> conclusion at that time was, that -02 optimizes the code, so it can
> "omit some" part of code and replace them by faster alternative. But
> the debuging symbols then don't correspond such optimized code... And
> even if i usually don't understand those backtraces, i want to provide
> them as much readable for developer as possible.

The debugging symbols do match to the optimised code, and refer you
back to the unoptimised line of source. Any cases where -O0 and -O2
give different results for backtraces are bugs in the gcc optimisation
code, not in Wine.

>> * Not testing the code under Release conditions.
> I guess, that running Word2007 under linux/wine also does not meet release
> conditions by Microsoft ;-) Anyway, i hope that if i run Win program
> calculating PI on 4 decimal place, both -O0 and -02 will give me 3.1415

The point is that Wine's code for releases is not compiled with -O0.
We don't want Word2007 bugs on

GCC's optimisation has nothing to do with accuracy; it's all to do
with speed. Speed of code execution is an issue primarily with latency
and race condition issues and/or bugs.

>> * Slow code.
> This line caused all this replay :) Because it does not says "How much".
> So i did some benchmarking which maybe some others find useful.
> Compilation of 1.1.43 -O0:
> * real 1m 58sec
> Compilation of 1.1.43 -O2:
> * real 3m 29sec
> i.e. -02 is 77% slower. So 10 round of regression test (with in-between
> make distclean) is slower in case of -02 cca about 15m 10sec. That's
> a lot especially if i want to take bug testing seriously.

"Slow code" and "slow compilation" are very different concerns.

For regression testing, make distclean is generally a bad idea as it
really does take a long time. Either way, ccache mitigates increases
in time, and -O0 may theoretically produce false positives for bug
testing where the issue is latency or race condition related.

> Quake 3 1600x1200:
> -O0: 215.0 FPS
> -O2: 220.1 FPS (2% faster)
> Quake 3 640x480:
> -O0: 548.3 FPS
> -O2: 581.0 FPS (6% faster)
> As i'm not pro-gamer anymore and the -O2 results aren't convincing i'll
> stay at -O0. Of course everyone has different needs and can find -O2
> useful.

I don't think Quake 3 counts as number-crunching. I imagine heavy
number-crunching apps would suffer significantly more with -O0.

More information about the wine-devel mailing list