[x265] cmake: avoid different stack alignment for GCC in 32-bit Windows
Pradeep Ramachandran
pradeep at multicorewareinc.com
Thu Jul 28 06:06:26 CEST 2016
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?
Pradeep.
On Thu, Jul 28, 2016 at 1:26 AM, Mateusz <mateusz at msystem.waw.pl> wrote:
> > Since you just want to stack alignment, so -mpreferred-stack-boundary is
> best choice.
> > 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.
> > --
> > Min
>
> OK, I've prepared new patch that adds -mpreferred-stack-boundary only for
> GCC 6 -- it doesn't slow-down working versions of GCC.
>
> # HG changeset patch
> # User Ma0 <mateuszb at poczta.onet.pl>
> # Date 1469648840 -7200
> # Wed Jul 27 21:47:20 2016 +0200
> # Node ID 83e4505f87c0cbc0cf8869f9277fded426524734
> # Parent 5a0e139e29386ecebafc9c555aedcd3e0f61c70c
> cmake: fix unaligned stack in 32-bit Windows for GCC 6
>
> diff -r 5a0e139e2938 -r 83e4505f87c0 source/CMakeLists.txt
> --- a/source/CMakeLists.txt Fri Jul 22 13:13:42 2016 +0530
> +++ b/source/CMakeLists.txt Wed Jul 27 21:47:20 2016 +0200
> @@ -184,6 +184,10 @@
> string(FIND "${CMAKE_CXX_FLAGS}" "-march" marchPos)
> if(marchPos LESS "0")
> add_definitions(-march=i686)
> + if(WIN32 AND NOT INTEL_CXX AND NOT CLANG AND
> + CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 AND
> CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0)
> + add_definitions(-mpreferred-stack-boundary=2)
> + endif()
> endif()
> endif()
> if(ARM AND CROSS_COMPILE_ARM)
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160728/bdd6221c/attachment.html>
More information about the x265-devel
mailing list