[ros-dev] [ros-diffs] [akhaldi] 57313: * Don't use -momit-leaf-frame-pointer in debug gcc builds, it messes up stack traces. * Remove it from the amd64 gcc builds too.
Timo Kreuzer
timo.kreuzer at web.de
Sun Sep 16 23:48:57 UTC 2012
Amd64 doesn't need a frame pointer. Backtraces are made based on unwind
tables. At least if GCC conforms to the ABI.
Am 16.09.2012 14:57, schrieb akhaldi at svn.reactos.org:
> Author: akhaldi
> Date: Sun Sep 16 12:57:22 2012
> New Revision: 57313
>
> URL: http://svn.reactos.org/svn/reactos?rev=57313&view=rev
> Log:
> * Don't use -momit-leaf-frame-pointer in debug gcc builds, it messes up stack traces.
> * Remove it from the amd64 gcc builds too.
>
> Modified:
> trunk/reactos/cmake/gcc.cmake
>
> Modified: trunk/reactos/cmake/gcc.cmake
> URL: http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=57313&r1=57312&r2=57313&view=diff
> ==============================================================================
> --- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
> +++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sun Sep 16 12:57:22 2012
> @@ -83,12 +83,15 @@
> if(ARCH STREQUAL "i386")
> add_compile_flags("-mpreferred-stack-boundary=3 -fno-set-stack-executable -fno-optimize-sibling-calls -fno-omit-frame-pointer")
> if(OPTIMIZE STREQUAL "1")
> - add_compile_flags("-ftracer -momit-leaf-frame-pointer")
> + add_compile_flags("-ftracer")
> + if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
> + add_compile_flags("-momit-leaf-frame-pointer")
> + endif()
> endif()
> elseif(ARCH STREQUAL "amd64")
> add_compile_flags("-mpreferred-stack-boundary=4")
> if(OPTIMIZE STREQUAL "1")
> - add_compile_flags("-ftracer -momit-leaf-frame-pointer")
> + add_compile_flags("-ftracer")
> endif()
> elseif(ARCH STREQUAL "arm")
> if(OPTIMIZE STREQUAL "1")
>
>
>
More information about the Ros-dev
mailing list