]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Cleanly support debug packages
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Feb 2012 18:42:07 +0000 (10:42 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Feb 2012 22:24:22 +0000 (14:24 -0800)
Allow a source rpm to be rebuilt with debugging enabled.  This
avoids the need to have to manually modify the spec file.  By
default debugging is still largely disabled.  To enable specific
debugging features use the following options with rpmbuild.

  '--with debug'               - Enables ASSERTs
  '--with debug-log'           - Enables the internal debug log
  '--with debug-kmem'          - Enables basic memory accounting
  '--with debug-kmem-tracking' - Enables detailed memory tracking

  # For example:
  $ rpmbuild --rebuild --with debug spl-modules-0.6.0-rc6.src.rpm

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Makefile.in
cmd/Makefile.in
config/rpm.am
config/spl-build.m4
configure
include/Makefile.in
lib/Makefile.in
scripts/Makefile.in
spl-modules.spec.in

index 90c10c0748cfa45ed19a7c37b663115ead317007..7c8f696a59ce27a2b9d007a0d9953ee1b81ee73c 100644 (file)
@@ -181,6 +181,10 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEBUG_KMEM = @DEBUG_KMEM@
+DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
+DEBUG_LOG = @DEBUG_LOG@
+DEBUG_SPL = @DEBUG_SPL@
 DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
@@ -905,6 +909,10 @@ rpm-common:
                --define "require_kdir $(LINUX)" \
                --define "require_kobj $(LINUX_OBJ)" \
                --define "require_kver $(LINUX_VERSION)" \
+               --define "$(DEBUG_SPL) 1" \
+               --define "$(DEBUG_LOG) 1" \
+               --define "$(DEBUG_KMEM) 1" \
+               --define "$(DEBUG_KMEM_TRACKING) 1" \
                --nodeps --rebuild $$rpmpkg || exit 1; \
        cp $$rpmbuild/RPMS/*/* . || exit 1; \
        $(RM) -R $$rpmbuild
index 5d6e0c9f07782ac4fdef4d5ff70aa401c71f0323..9406aeb2c412b67a46fd89965a562c7978903f4d 100644 (file)
@@ -117,6 +117,10 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEBUG_KMEM = @DEBUG_KMEM@
+DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
+DEBUG_LOG = @DEBUG_LOG@
+DEBUG_SPL = @DEBUG_SPL@
 DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
index 0aae425866d47e88ef5bdf0a6abe5045841f15e5..7dfe4fd9b96b0f3d30e034d07fdf83f94898e06f 100644 (file)
@@ -73,6 +73,10 @@ rpm-common:
                --define "require_kdir $(LINUX)" \
                --define "require_kobj $(LINUX_OBJ)" \
                --define "require_kver $(LINUX_VERSION)" \
+               --define "$(DEBUG_SPL) 1" \
+               --define "$(DEBUG_LOG) 1" \
+               --define "$(DEBUG_KMEM) 1" \
+               --define "$(DEBUG_KMEM_TRACKING) 1" \
                --nodeps --rebuild $$rpmpkg || exit 1; \
        cp $$rpmbuild/RPMS/*/* . || exit 1; \
        $(RM) -R $$rpmbuild
index 205eb6bc5172a4fd06a7872297404bf8b5403e7e..eee950c6704e19621a355f921f1013b54ffe3c3e 100644 (file)
@@ -476,13 +476,15 @@ AC_DEFUN([SPL_AC_DEBUG], [
        [
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
                DEBUG_CFLAGS="-DDEBUG -Werror"
-       ],
-       [
+               DEBUG_SPL="_with_debug"
+       ], [
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"
                DEBUG_CFLAGS="-DNDEBUG"
+               DEBUG_SPL="_without_debug"
        ])
 
        AC_SUBST(DEBUG_CFLAGS)
+       AC_SUBST(DEBUG_SPL)
        AC_MSG_RESULT([$enable_debug])
 ])
 
@@ -505,10 +507,16 @@ AC_DEFUN([SPL_AC_DEBUG_LOG], [
                [enable_debug_log=yes])
 
        AS_IF([test "x$enable_debug_log" = xyes],
-               [AC_DEFINE([DEBUG_LOG], [1],
+       [
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+               DEBUG_LOG="_with_debug_log"
+               AC_DEFINE([DEBUG_LOG], [1],
                [Define to 1 to enable basic debug logging])
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"])
+       ], [
+               DEBUG_LOG="_without_debug_log"
+       ])
 
+       AC_SUBST(DEBUG_LOG)
        AC_MSG_CHECKING([whether basic debug logging is enabled])
        AC_MSG_RESULT([$enable_debug_log])
 ])
@@ -528,10 +536,16 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM], [
                [enable_debug_kmem=yes])
 
        AS_IF([test "x$enable_debug_kmem" = xyes],
-               [AC_DEFINE([DEBUG_KMEM], [1],
+       [
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+               DEBUG_KMEM="_with_debug_kmem"
+               AC_DEFINE([DEBUG_KMEM], [1],
                [Define to 1 to enable basic kmem accounting])
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"])
+       ], [
+               DEBUG_KMEM="_without_debug_kmem"
+       ])
 
+       AC_SUBST(DEBUG_KMEM)
        AC_MSG_CHECKING([whether basic kmem accounting is enabled])
        AC_MSG_RESULT([$enable_debug_kmem])
 ])
@@ -553,10 +567,16 @@ AC_DEFUN([SPL_AC_DEBUG_KMEM_TRACKING], [
                [enable_debug_kmem_tracking=no])
 
        AS_IF([test "x$enable_debug_kmem_tracking" = xyes],
-               [AC_DEFINE([DEBUG_KMEM_TRACKING], [1],
+       [
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+               DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
+               AC_DEFINE([DEBUG_KMEM_TRACKING], [1],
                [Define to 1 to enable detailed kmem tracking])
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"])
+       ], [
+               DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
+       ])
 
+       AC_SUBST(DEBUG_KMEM_TRACKING)
        AC_MSG_CHECKING([whether detailed kmem tracking is enabled])
        AC_MSG_RESULT([$enable_debug_kmem_tracking])
 ])
index 3b3439ad19325c73f4b524b6fe3551aa826db149..3d67ecef2a768851f704b97131911bc3d86f97fa 100755 (executable)
--- a/configure
+++ b/configure
@@ -791,6 +791,10 @@ CONFIG_KERNEL_FALSE
 CONFIG_KERNEL_TRUE
 CONFIG_USER_FALSE
 CONFIG_USER_TRUE
+DEBUG_KMEM_TRACKING
+DEBUG_KMEM
+DEBUG_LOG
+DEBUG_SPL
 DEBUG_CFLAGS
 KERNELCPPFLAGS
 KERNELMAKE_PARAMS
@@ -4785,13 +4789,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:4788: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:4792: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4791: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:4795: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:4794: output\"" >&5)
+  (eval echo "\"\$as_me:4798: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5997,7 +6001,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6000 "configure"' > conftest.$ac_ext
+  echo '#line 6004 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7850,11 +7854,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7853: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7857: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7857: \$? = $ac_status" >&5
+   echo "$as_me:7861: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8189,11 +8193,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8192: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8196: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8196: \$? = $ac_status" >&5
+   echo "$as_me:8200: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8294,11 +8298,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8297: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8301: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8301: \$? = $ac_status" >&5
+   echo "$as_me:8305: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8349,11 +8353,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8352: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8356: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8356: \$? = $ac_status" >&5
+   echo "$as_me:8360: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -11152,7 +11156,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11155 "configure"
+#line 11159 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11248,7 +11252,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11251 "configure"
+#line 11255 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
                DEBUG_CFLAGS="-DDEBUG -Werror"
+               DEBUG_SPL="_with_debug"
 
 else
 
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"
                DEBUG_CFLAGS="-DNDEBUG"
+               DEBUG_SPL="_without_debug"
 
 fi
 
 
 
+
        { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5
 $as_echo "$enable_debug" >&6; }
 
 
        if test "x$enable_debug_log" = xyes; then
 
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+               DEBUG_LOG="_with_debug_log"
+
 cat >>confdefs.h <<\_ACEOF
 #define DEBUG_LOG 1
 _ACEOF
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+
+else
+
+               DEBUG_LOG="_without_debug_log"
+
 fi
 
 
+
        { $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5
 $as_echo_n "checking whether basic debug logging is enabled... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5
 
        if test "x$enable_debug_kmem" = xyes; then
 
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+               DEBUG_KMEM="_with_debug_kmem"
+
 cat >>confdefs.h <<\_ACEOF
 #define DEBUG_KMEM 1
 _ACEOF
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+
+else
+
+               DEBUG_KMEM="_without_debug_kmem"
+
 fi
 
 
+
        { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5
 $as_echo_n "checking whether basic kmem accounting is enabled... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5
 
        if test "x$enable_debug_kmem_tracking" = xyes; then
 
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+               DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
+
 cat >>confdefs.h <<\_ACEOF
 #define DEBUG_KMEM_TRACKING 1
 _ACEOF
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+
+else
+
+               DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
+
 fi
 
 
+
        { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5
 $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5
 
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
                DEBUG_CFLAGS="-DDEBUG -Werror"
+               DEBUG_SPL="_with_debug"
 
 else
 
                KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG"
                DEBUG_CFLAGS="-DNDEBUG"
+               DEBUG_SPL="_without_debug"
 
 fi
 
 
 
+
        { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5
 $as_echo "$enable_debug" >&6; }
 
 
        if test "x$enable_debug_log" = xyes; then
 
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+               DEBUG_LOG="_with_debug_log"
+
 cat >>confdefs.h <<\_ACEOF
 #define DEBUG_LOG 1
 _ACEOF
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_LOG"
+
+else
+
+               DEBUG_LOG="_without_debug_log"
+
 fi
 
 
+
        { $as_echo "$as_me:$LINENO: checking whether basic debug logging is enabled" >&5
 $as_echo_n "checking whether basic debug logging is enabled... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $enable_debug_log" >&5
 
        if test "x$enable_debug_kmem" = xyes; then
 
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+               DEBUG_KMEM="_with_debug_kmem"
+
 cat >>confdefs.h <<\_ACEOF
 #define DEBUG_KMEM 1
 _ACEOF
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM"
+
+else
+
+               DEBUG_KMEM="_without_debug_kmem"
+
 fi
 
 
+
        { $as_echo "$as_me:$LINENO: checking whether basic kmem accounting is enabled" >&5
 $as_echo_n "checking whether basic kmem accounting is enabled... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem" >&5
 
        if test "x$enable_debug_kmem_tracking" = xyes; then
 
+               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+               DEBUG_KMEM_TRACKING="_with_debug_kmem_tracking"
+
 cat >>confdefs.h <<\_ACEOF
 #define DEBUG_KMEM_TRACKING 1
 _ACEOF
 
-               KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM_TRACKING"
+
+else
+
+               DEBUG_KMEM_TRACKING="_without_debug_kmem_tracking"
+
 fi
 
 
+
        { $as_echo "$as_me:$LINENO: checking whether detailed kmem tracking is enabled" >&5
 $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; }
        { $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5
index 37fce0449a35dd5a9289a7232d5134fa09cc63e1..1e6aa5fe6a6cb329580ccc74ebb789faf279ea7a 100644 (file)
@@ -76,6 +76,10 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEBUG_KMEM = @DEBUG_KMEM@
+DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
+DEBUG_LOG = @DEBUG_LOG@
+DEBUG_SPL = @DEBUG_SPL@
 DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
index 4fdae68e27bb621155cd1a9f854a775d3b91d3a3..12315faf0bc629cb3c939fa21fc74bbeed6dfc10 100644 (file)
@@ -109,6 +109,10 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEBUG_KMEM = @DEBUG_KMEM@
+DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
+DEBUG_LOG = @DEBUG_LOG@
+DEBUG_SPL = @DEBUG_SPL@
 DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
index d007d0bd842bf78e284ebc96c81b85aeff797a2b..ed9c78461380772fe64eb93355984c964bab9d8e 100644 (file)
@@ -71,6 +71,10 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
 DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEBUG_KMEM = @DEBUG_KMEM@
+DEBUG_KMEM_TRACKING = @DEBUG_KMEM_TRACKING@
+DEBUG_LOG = @DEBUG_LOG@
+DEBUG_SPL = @DEBUG_SPL@
 DEFAULT_PACKAGE = @DEFAULT_PACKAGE@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
index ace5cbcd60d543d2fd6a066a9ef6dd19a2884be0..2a2c8f468f863cb1d057cf6af405c70d3158075b 100644 (file)
 %define kobj %{require_kobj}
 %endif
 
+# Set using 'rpmbuild ... --with debug ...', defaults to disabled.
+%if %{defined _with_debug}
+ %define kdebug --enable-debug
+%else
+ %if %{defined _without_debug}
+  %define kdebug --disable-debug
+ %else
+  %define kdebug --disable-debug
+ %endif
+%endif
+
+# Set using 'rpmbuild ... --with debug-log ...', defaults to enabled.
+%if %{defined _with_debug_log}
+ %define kdebug_log --enable-debug-log
+%else
+ %if %{defined _without_debug_log}
+  %define kdebug_log --disable-debug-log
+ %else
+  %define kdebug_log --enable-debug-log
+ %endif
+%endif
+
+# Set using 'rpmbuild ... --with debug-kmem ...', defaults to enabled.
+%if %{defined _with_debug_kmem}
+ %define kdebug_kmem --enable-debug-kmem
+%else
+ %if %{defined _without_debug_kmem}
+  %define kdebug_kmem --disable-debug-kmem
+ %else
+  %define kdebug_kmem --enable-debug-kmem
+ %endif
+%endif
+
+# Set using 'rpmbuild ... --with debug-tracking ...', defaults to disabled.
+%if %{defined _with_debug_kmem_tracking}
+ %define kdebug_kmem_tracking --enable-debug-kmem-tracking
+%else
+ %if %{defined _without_debug_kmem_tracking}
+  %define kdebug_kmem_tracking --disable-debug-kmem-tracking
+ %else
+  %define kdebug_kmem_tracking --disable-debug-kmem-tracking
+ %endif
+%endif
+
 # SLES:
 %if %{defined suse_version}
  %if %{undefined kver}
@@ -213,8 +257,8 @@ symbols needed for building additional modules which use %{name}.
 %prep
 %setup -n @PACKAGE@-%{version}
 %build
-%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} \
-           --with-config=kernel
+%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} --with-config=kernel \
+           %{kdebug} %{kdebug_log} %{kdebug_kmem} %{kdebug_kmem_tracking}
 make
 
 %install