Boost C++ Libraries: Ticket #9791: [libs/program_options] winmain.cpp fails to compile with -O3, ok with -O0 (gcc-5666.3) https://svn.boost.org/trac10/ticket/9791 <p> Hello </p> <p> I have identified a problem when cross-compiling libs\program_options\src\winmain.cpp with Apple's gcc-5666.3 (4.2.1) and the -O3/2/1 switches, it works fine with -O0 </p> <pre class="wiki">"X:/libs/gcc-5666.3-x86_64-apple-darwin10/bin/g++.exe" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m32 -w -m32 -DBOOST_ALL_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2\libs\program_options\build\gcc-4.2.1\release\abi-sysv\address-model-32\binary-format-mach-o\link-static\strip-on\target-os-darwin\threadapi-pthread\threading-multi\winmain.o" "libs\program_options\src\winmain.cpp" </pre><p> Unfortunately I don't have any more logs but I have uploaded the gcc-5666.3-x86_64-apple-darwin10.tar.xz on my googledrive if you want to give a shot by yourself <a class="ext-link" href="https://drive.google.com/folderview?id=0B4dcRcayW88VNmRtZDEybEZoLTQ&amp;usp=sharing"><span class="icon">​</span>https://drive.google.com/folderview?id=0B4dcRcayW88VNmRtZDEybEZoLTQ&amp;usp=sharing</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9791 Trac 1.4.3 class101 <ad@…> Tue, 18 Mar 2014 17:26:10 GMT <link>https://svn.boost.org/trac10/ticket/9791#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9791#comment:1</guid> <description> <p> Little addition: -O3 works fine with address-model=64 (-m64) but fails with address-model=32 (-m32) </p> <p> Command used: </p> <pre class="wiki">b2 -j10 -d0 toolset=gcc variant=release abi=sysv address-model=32 binary-format=mach-o link=static,shared pch=off strip=on target-os=darwin threading=multi threadapi=pthread cxxflags="-w -m32" linkflags="-w -m32 -lstdc++" --without-python --without-mpi --prefix=x:/libs/boost-1_56 --libdir=x:/libs/boost-1_56/lib --includedir=x:/libs install </pre><p> Config used: </p> <pre class="wiki">import option ; using gcc : : "X:/libs/gcc-5666.3-x86_64-apple-darwin10/bin/g++.exe" : &lt;archiver&gt;X:/libs/gcc-5666.3-x86_64-apple-darwin10/bin/ar.exe &lt;ranlib&gt;X:/libs/gcc-5666.3-x86_64-apple-darwin10/bin/ranlib.exe &lt;rc&gt;X:/libs/gcc-5666.3-x86_64-apple-darwin10/bin/as.exe &lt;linker-type&gt;darwin ; option.set keep-going : false ; </pre> </description> <category>Ticket</category> </item> <item> <author>class101 <ad@…></author> <pubDate>Wed, 19 Mar 2014 18:50:40 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9791#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9791#comment:2</guid> <description> <p> There is a high chance you cannot reproduce this bug, because the gcc-5666.3 I'm using is not 100% from Apple, it is a crosscompiler with patch applied on it, for example I couldn't generate muliarch fat binaries due to a bug in the cross compiler version on Windows </p> <p> When if you can't reproduce this on the official gcc-5666.3 then disregard and close this ticket because won't be fixable on your end. </p> </description> <category>Ticket</category> </item> </channel> </rss>