Skip to content
Snippets Groups Projects
Commit 8e911a96 authored by Moe Jette's avatar Moe Jette
Browse files

Always turn on "-g" CFLAG so that debugger works properly with srun.

parent d46a2773
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
# If CFLAGS are not passed to configure, they will be set based # If CFLAGS are not passed to configure, they will be set based
# on whether debugging has been enabled. Also, the NDEBUG macro # on whether debugging has been enabled. Also, the NDEBUG macro
# (used by assert) will be set accordingly. # (used by assert) will be set accordingly.
# Always enable "-g" debug flag so debugger can work with srun.
# #
# WARNINGS: # WARNINGS:
# This macro must be placed after AC_PROG_CC or equivalent. # This macro must be placed after AC_PROG_CC or equivalent.
...@@ -30,9 +31,13 @@ AC_DEFUN([X_AC_DEBUG], ...@@ -30,9 +31,13 @@ AC_DEFUN([X_AC_DEBUG],
esac esac
] ]
) )
if test -z "$ac_save_CFLAGS"; then
test "$ac_cv_prog_cc_g" = yes && CFLAGS="-g $CFLAGS"
fi
if test "$ac_debug" = yes; then if test "$ac_debug" = yes; then
if test -z "$ac_save_CFLAGS"; then if test -z "$ac_save_CFLAGS"; then
test "$ac_cv_prog_cc_g" = yes && CFLAGS="-g $CFLAGS"
test "$GCC" = yes && test "$GCC" = yes &&
CFLAGS="-Wall -fno-strict-aliasing $CFLAGS" CFLAGS="-Wall -fno-strict-aliasing $CFLAGS"
AC_DEFINE(DEBUG_SYSTEM, 1, [Define for extra debug messages.]) AC_DEFINE(DEBUG_SYSTEM, 1, [Define for extra debug messages.])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment