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@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&a... ============================================================================== --- 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") elseif(ARCH STREQUAL "amd64") add_compile_flags("-mpreferred-stack-boundary=4") if(OPTIMIZE STREQUAL "1")endif() endif()
add_compile_flags("-ftracer -momit-leaf-frame-pointer")
elseif(ARCH STREQUAL "arm") if(OPTIMIZE STREQUAL "1")add_compile_flags("-ftracer") endif()
On 2012-09-17 01:48, Timo Kreuzer wrote:
Amd64 doesn't need a frame pointer. Backtraces are made based on unwind tables. At least if GCC conforms to the ABI.
That's why the option was removed. It doesn't do anything anyway ;) Any form of -O implies -fomit-frame-pointer on AMD64 AFAIK.