issue-480: duplicate of issue-385 fixed in r150 however some of the comments in the code

regarding frame pointers needed to be clarified.


git-svn-id: http://gperftools.googlecode.com/svn/trunk@165 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
This commit is contained in:
chappedm@gmail.com 2012-11-03 14:13:21 +00:00
parent 4f325fbcc9
commit c566266b10
2 changed files with 4 additions and 7 deletions

View File

@ -69,15 +69,14 @@ endif !ENABLE_FRAME_POINTERS
endif X86_64_AND_NO_FP_BY_DEFAULT endif X86_64_AND_NO_FP_BY_DEFAULT
# As of gcc 4.6, -fomit-frame-pointer is the default even for i386. Since # As of gcc 4.6, -fomit-frame-pointer is the default even for i386. Since
# we must always have frame pointers for i386 in order to generate backtraces # we must always have frame pointers for gcc i386 in order to generate
# we now specify -fno-omit-frame-pointer by default (i386 only). # backtraces we now specify -fno-omit-frame-pointer by default (i386 only).
if GCC if GCC
if I386 if I386
AM_CXXFLAGS += -fno-omit-frame-pointer AM_CXXFLAGS += -fno-omit-frame-pointer
endif I386 endif I386
endif GCC endif GCC
# For windows systems (at least, mingw), we need to tell all our # For windows systems (at least, mingw), we need to tell all our
# tests to link in libtcmalloc using -u. This is because libtcmalloc # tests to link in libtcmalloc using -u. This is because libtcmalloc
# accomplishes its tasks via patching, leaving no work for the linker # accomplishes its tasks via patching, leaving no work for the linker

View File

@ -214,16 +214,14 @@ AM_CONDITIONAL(ENABLE_STATIC, test "$enable_static" = yes)
AC_CHECK_LIB(unwind, backtrace, UNWIND_LIBS=-lunwind, UNWIND_LIBS=) AC_CHECK_LIB(unwind, backtrace, UNWIND_LIBS=-lunwind, UNWIND_LIBS=)
AC_SUBST(UNWIND_LIBS) AC_SUBST(UNWIND_LIBS)
# On x86_64, instead of libunwind, we can choose to compile with frame-pointers # On x86_64, instead of libunwind, we can choose to compile with frame-pointers.
# (This isn't needed on i386, where -fno-omit-frame-pointer is the default).
AC_ARG_ENABLE(frame_pointers, AC_ARG_ENABLE(frame_pointers,
AS_HELP_STRING([--enable-frame-pointers], AS_HELP_STRING([--enable-frame-pointers],
[On x86_64 systems, compile with -fno-omit-frame-pointer (see INSTALL)]), [On x86_64 systems, compile with -fno-omit-frame-pointer (see INSTALL)]),
, enable_frame_pointers=no) , enable_frame_pointers=no)
AM_CONDITIONAL(ENABLE_FRAME_POINTERS, test "$enable_frame_pointers" = yes) AM_CONDITIONAL(ENABLE_FRAME_POINTERS, test "$enable_frame_pointers" = yes)
# Some x86_64 systems do not insert frame pointers by default (all # Some x86_64 systems do not insert frame pointers by default.
# i386 systems that I know of, do. I don't know about non-x86 chips).
# We want to see if the current system is one of those. # We want to see if the current system is one of those.
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __x86_64__ == 1 ? 0 : 1])], AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [return __x86_64__ == 1 ? 0 : 1])],
[is_x86_64=yes], [is_x86_64=no]) [is_x86_64=yes], [is_x86_64=no])