From 15270e003ed666ad965ab9f73b390846823998fd Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 20 Jan 2009 11:59:47 -0800 Subject: [PATCH] Ensure -NDEBUG does not get added to spl_config.h and is only set in the build options. This allows other kernel modules to use spl_config to leverage the reset of the config checks without getting confused with the debug options --- config/spl-build.m4 | 2 -- configure | 5 ----- module/spl/spl-debug.c | 2 -- spl_config.h.in | 3 --- 4 files changed, 12 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index c5c0319772..9931330651 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -97,8 +97,6 @@ AC_DEFUN([SPL_AC_DEBUG], [ KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" else AC_MSG_RESULT([no]) - AC_DEFINE([NDEBUG], [1], - [Define to 1 to disable debug tracing]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" fi ]) diff --git a/configure b/configure index 2ecf422f03..5ac16ce742 100755 --- a/configure +++ b/configure @@ -19046,11 +19046,6 @@ echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 - -cat >>confdefs.h <<\_ACEOF -#define NDEBUG 1 -_ACEOF - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" fi diff --git a/module/spl/spl-debug.c b/module/spl/spl-debug.c index df22cbc487..d2b96b0c34 100644 --- a/module/spl/spl-debug.c +++ b/module/spl/spl-debug.c @@ -1118,10 +1118,8 @@ void spl_debug_bug(char *file, const char *func, const int line, int flags) if (spl_debug_panic_on_bug) spl_panic_in_progress = 1; -#ifdef DEBUG spl_debug_dumpstack(NULL); spl_debug_dumplog(flags); -#endif if (spl_debug_panic_on_bug) panic("SBUG"); diff --git a/spl_config.h.in b/spl_config.h.in index dfca13d099..c19555a06a 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -108,9 +108,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 to disable debug tracing */ -#undef NDEBUG - /* Name of package */ #undef PACKAGE