<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Apr 18, 2013 at 1:32 AM, James Eder <span dir="ltr"><<a href="mailto:jimportal@gmail.com" target="_blank">jimportal@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div class="h5"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 15, 2013 at 3:58 PM, Marcus Meissner <span dir="ltr"><<a href="mailto:marcus@jet.franken.de" target="_blank">marcus@jet.franken.de</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>On Mon, Apr 15, 2013 at 02:37:27PM -0600, James Eder wrote:<br>
> As many of you no doubt know,  GCC recently released 4.8.0.  This new<br>
> version introduces a new optimization level enabled by -Og with the<br>
> following description (from the man page):<br>
><br>
> "Optimize debugging experience. -Og enables optimizations that do not<br>
> interfere with debugging. It should be the optimization level of choice for<br>
> the standard edit-compile-debug cycle, offering a reasonable level of<br>
> optimization while maintaining fast compilation and a good debugging<br>
> experience."<br>
><br>
> Of course I had to try it out.  I found that building Wine lead to GCC<br>
> dieing with<br>
><br>
>   ... dlls/kernel32/console.c:1691:1: internal compiler error: Segmentation<br>
> fault<br>
><br>
> I also found<br>
><br>
>   ... dlls/kernel32/computername.c:701:1: internal compiler error:<br>
> Segmentation fault<br>
><br>
> I eventually stumbled my way into the enclosed patch which lets GCC build<br>
> Wine with -Og.<br>
><br>
> I'm not sure if this change (or something similar) makes sense for Wine.<br>
> I'm fairly certain some changes make sense for GCC (I suspect that GCC<br>
> should not segfault).<br>
><br>
> I haven't submitted a bug for GCC because I suspect they'll want me to<br>
> provide something simpler to compile than the Wine source tree.  I<br>
> certainly won't be upset if someone beats me too it.  I'm not sure how much<br>
> time in the near future I'll spend on it.  "Eventually" is probably the<br>
> word that fits.<br>
><br>
> At any rate, I wanted to at least share my experiences in case anyone is<br>
> interested in heading down the same path.<br>
<br>
</div></div>You copy and paste the failing commandline and add --save-temps, like e.g.:<br>
<br>
        gcc -c -I/home/marcus/projects/wine/dlls/kernel32 -I. -I/home/marcus/projects/wine/include -I../../include  -D__WINESRC__ -D_KERNEL32_ -D_NORMALIZE_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wwrite-strings -gdwarf-2 -gstrict-dwarf -Wpointer-arith -Wlogical-op -I/usr/include/freetype2    -Wall  -g -fstack-protector  -o console.o /home/marcus/projects/wine/dlls/kernel32/console.c -Og --save-temps<br>




<br>
it will generate a console.i file in the currenct directory.<br>
<br>
The console.i file and above commandline are a start for the gcc bug.<br>
<br>
Ciao, Marcus<br>
</blockquote></div><br></div></div></div><div class="gmail_extra">Looks like the bug is fixed and should be in for GCC 4.8.1. <a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56992" target="_blank">http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56992</a><span class=""><font color="#888888"><br clear="all">


</font></span></div><span class=""><font color="#888888"><div class="gmail_extra"><br>-- <br>Jim
</div></font></span></div>
<br></blockquote></div>FWIW, this is separate from <a href="http://bugs.winehq.org/show_bug.cgi?id=33307">http://bugs.winehq.org/show_bug.cgi?id=33307</a>, which is still present in gcc trunk (both master and the gcc_48 branch.<br>

<br></div><div class="gmail_extra">-- <br>-Austin
</div></div>