<div dir="ltr">Thanks Matuesz. Is there any description of this bug in gcc 6.0 that you can share so that we can understand the bug before we commit this code?<div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Pradeep.</div><div><br></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_quote">On Thu, Jul 28, 2016 at 1:26 AM, Mateusz <span dir="ltr"><<a href="mailto:mateusz@msystem.waw.pl" target="_blank">mateusz@msystem.waw.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> Since you just want to stack alignment, so -mpreferred-stack-boundary is best choice.<br>
> The -msse2 will allow compiler automatic generate SSE2 code, since we use C++ code, it easy to catch compiler bugs, so I avoid to use these side effect option.<br>
> --<br>
> Min<br>
<br>
</span>OK, I've prepared new patch that adds -mpreferred-stack-boundary only for GCC 6 -- it doesn't slow-down working versions of GCC.<br>
<span class=""><br>
# HG changeset patch<br>
# User Ma0 <<a href="mailto:mateuszb@poczta.onet.pl">mateuszb@poczta.onet.pl</a>><br>
</span># Date 1469648840 -7200<br>
# Wed Jul 27 21:47:20 2016 +0200<br>
# Node ID 83e4505f87c0cbc0cf8869f9277fded426524734<br>
# Parent 5a0e139e29386ecebafc9c555aedcd3e0f61c70c<br>
cmake: fix unaligned stack in 32-bit Windows for GCC 6<br>
<br>
diff -r 5a0e139e2938 -r 83e4505f87c0 source/CMakeLists.txt<br>
<span class="">--- a/source/CMakeLists.txt Fri Jul 22 13:13:42 2016 +0530<br>
</span>+++ b/source/CMakeLists.txt Wed Jul 27 21:47:20 2016 +0200<br>
@@ -184,6 +184,10 @@<br>
<span class=""> string(FIND "${CMAKE_CXX_FLAGS}" "-march" marchPos)<br>
if(marchPos LESS "0")<br>
add_definitions(-march=i686)<br>
</span>+ if(WIN32 AND NOT INTEL_CXX AND NOT CLANG AND<br>
+ CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)<br>
+ add_definitions(-mpreferred-stack-boundary=2)<br>
<div class="HOEnZb"><div class="h5">+ endif()<br>
endif()<br>
endif()<br>
if(ARM AND CROSS_COMPILE_ARM)<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</div></div></blockquote></div><br></div></div>