summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/rpm.am1
-rw-r--r--config/zfs-build.m44
2 files changed, 5 insertions, 0 deletions
diff --git a/config/rpm.am b/config/rpm.am
index c352fc582..d557f77b4 100644
--- a/config/rpm.am
+++ b/config/rpm.am
@@ -68,6 +68,7 @@ rpm-common:
--define "require_spldir $(SPL)" \
--define "require_splobj $(SPL_OBJ)" \
--define "require_splver $(SPL_VERSION)" \
+ --define "$(DEBUG_ZFS) 1" \
--nodeps --rebuild $$rpmpkg || exit 1; \
cp $$rpmbuild/RPMS/*/* . || exit 1; \
$(RM) -R $$rpmbuild
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4
index aa8d3e5ee..823f33266 100644
--- a/config/zfs-build.m4
+++ b/config/zfs-build.m4
@@ -20,16 +20,20 @@ AC_DEFUN([ZFS_AC_DEBUG], [
HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG -Werror"
DEBUG_CFLAGS="-DDEBUG -Werror"
DEBUG_STACKFLAGS="-fstack-check"
+ DEBUG_ZFS="_with_debug"
+ AC_DEFINE(ZFS_DEBUG, 1, [zfs debugging enabled])
],
[
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG "
HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG "
DEBUG_CFLAGS="-DNDEBUG"
DEBUG_STACKFLAGS=""
+ DEBUG_ZFS="_without_debug"
])
AC_SUBST(DEBUG_CFLAGS)
AC_SUBST(DEBUG_STACKFLAGS)
+ AC_SUBST(DEBUG_ZFS)
AC_MSG_RESULT([$enable_debug])
])