Use DWARF debugging with recent gcc.

Oh, wow, I wish I'd known about it before. C macro evaluation in gdb!!!
*sob*
This commit is contained in:
Bill Currie 2012-11-14 14:51:23 +09:00
parent 33eb3f2418
commit ef7678fcec

View file

@ -40,7 +40,17 @@ AC_MSG_CHECKING(for debugging)
if test "x$debug" != xno -a "x$leave_cflags_alone" != xyes; then
AC_MSG_RESULT(yes)
BUILD_TYPE="$BUILD_TYPE Debug"
CFLAGS="$CFLAGS -g"
DEBUG=-g
if test "x$GCC" = xyes; then
if test "$CC_MAJ" -ge 4; then
DEBUG=-g3
else
if test "$CC_MAJ" -eq 3 -a "$CC_MIN" -ge 1; then
DEBUG=-g3
fi
fi
fi
CFLAGS="$CFLAGS $DEBUG"
else
AC_MSG_RESULT(no)
fi