diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk index 077009baebf0..b47b71cdce22 100644 --- a/sys/conf/kern.opts.mk +++ b/sys/conf/kern.opts.mk @@ -42,6 +42,7 @@ __DEFAULT_YES_OPTIONS = \ IPFILTER \ IPSEC_SUPPORT \ ISCSI \ + SPLIT_KERNEL_DEBUG \ KERNEL_SYMBOLS \ NETGRAPH \ OFED \ @@ -178,6 +179,10 @@ MK_${var}_SUPPORT:= yes .endif .endfor +.if ${MK_SPLIT_KERNEL_DEBUG} == "no" +MK_KERNEL_SYMBOLS:= no +.endif + # Some modules only compile successfully if option FDT is set, due to #ifdef FDT # wrapped around declarations. Module makefiles can optionally compile such # things using .if !empty(OPT_FDT) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 2ab8fb576472..63041480eca9 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -217,7 +217,7 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} PROG= ${KMOD}.ko .endif -.if !defined(DEBUG_FLAGS) || ${MK_KERNEL_SYMBOLS} == "no" +.if !defined(DEBUG_FLAGS) || ${MK_SPLIT_KERNEL_DEBUG} == "no" FULLPROG= ${PROG} .else FULLPROG= ${PROG}.full @@ -321,7 +321,7 @@ ${_ILINKS}: CLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} -.if defined(DEBUG_FLAGS) && ${MK_KERNEL_SYMBOLS} != "no" +.if defined(DEBUG_FLAGS) && ${MK_SPLIT_KERNEL_DEBUG} != "no" CLEANFILES+= ${FULLPROG} ${PROG}.debug .endif diff --git a/tools/build/options/WITHOUT_KERNEL_SYMBOLS b/tools/build/options/WITHOUT_KERNEL_SYMBOLS index 7837744cf399..c56359d9fa6b 100644 --- a/tools/build/options/WITHOUT_KERNEL_SYMBOLS +++ b/tools/build/options/WITHOUT_KERNEL_SYMBOLS @@ -1,4 +1,3 @@ .\" $FreeBSD$ -Do not build or install standalone kernel debug symbol files. -Debug data (if enabled by the kernel configuration file) -will be included in the kernel and modules. +Do not install standalone kernel debug symbol files. +This option has no effect at build time. diff --git a/tools/build/options/WITHOUT_SPLIT_KERNEL_DEBUG b/tools/build/options/WITHOUT_SPLIT_KERNEL_DEBUG new file mode 100644 index 000000000000..a23bcd5ffdb6 --- /dev/null +++ b/tools/build/options/WITHOUT_SPLIT_KERNEL_DEBUG @@ -0,0 +1,3 @@ +Do not build standalone kernel debug files. +Debug data (if enabled by the kernel configuration file) +will be included in the kernel and modules.