diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index d5f42e8d8c..93b415850c 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -665,6 +665,12 @@ case $AFS_SYSNAME in AC_SUBST(install_XFS_SIZE_CHECK) AC_SUBST(dest_XFS_SIZE_CHECK) ;; + *_fbsd_*) + if test "x$enable_debug_kernel" = "xyes"; then + DEBUG_FLAGS=-g + AC_SUBST(DEBUG_FLAGS) + fi + ;; esac dnl Disable the default for debugging/optimization if not enabled diff --git a/src/libafs/MakefileProto.FBSD.in b/src/libafs/MakefileProto.FBSD.in index 9ba0954261..227fe1b564 100644 --- a/src/libafs/MakefileProto.FBSD.in +++ b/src/libafs/MakefileProto.FBSD.in @@ -46,6 +46,9 @@ AFS_OS_NONFSOBJS = \ KSRC = @BSD_KERNEL_PATH@ KBLD = @BSD_KERNEL_BUILD@ +# keep symbols if --enable-debug-kernel +DEBUG_FLAGS = @DEBUG_FLAGS@ + # We are not doing very well (WARNS=2 brings in printf format type checking) WARNS= 1 # We have some sketchy code that redeclares prototypes