Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src PR/55557: Andreas Gustafsson" Introduce a new variable MKDEB...
details: https://anonhg.NetBSD.org/src/rev/2f9b7cfe6eed
branches: trunk
changeset: 1029064:2f9b7cfe6eed
user: christos <christos%NetBSD.org@localhost>
date: Mon Dec 20 14:41:26 2021 +0000
description:
PR/55557: Andreas Gustafsson" Introduce a new variable MKDEBUGKERNEL which
as the name implies, includes a netbsd.gdb inside each kernel set:
$ tar -tzvf kern-GENERIC.tgz
-rwxr-xr-x 0 root wheel 29398264 Dec 19 12:50 ./netbsd
-rwxr-xr-x 0 root wheel 208125880 Dec 19 12:50 ./netbsd.gdb
diffstat:
etc/Makefile | 6 +++++-
share/mk/bsd.README | 5 ++++-
share/mk/bsd.own.mk | 4 ++--
3 files changed, 11 insertions(+), 4 deletions(-)
diffs (64 lines):
diff -r 3e96cc96f910 -r 2f9b7cfe6eed etc/Makefile
--- a/etc/Makefile Mon Dec 20 13:58:58 2021 +0000
+++ b/etc/Makefile Mon Dec 20 14:41:26 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.452 2021/09/26 15:52:40 maya Exp $
+# $NetBSD: Makefile,v 1.453 2021/12/20 14:41:26 christos Exp $
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
# Environment variables without default values:
@@ -590,6 +590,7 @@
build_kernels: kern-${configfile}
kern-${configfile}: .PHONY .MAKE
cd ${KERNCONFDIR} && ${TOOL_CONFIG} ${CONFIGOPTS} -s ${KERNSRCDIR} \
+ ${MKDEBUGKERNEL == "yes" :? -DDEBUG=-g :} \
-b ${KERNOBJDIR}/${configfile:C/.*\///} ${configfile}
.if ${MKUPDATE} == "no"
${MAKE} -C ${KERNOBJDIR}/${configfile:C/.*\///} distclean
@@ -622,6 +623,9 @@
kernels="$${kernels} $${ks}"; \
[ -z "$${newest}" -o $${ks} \
-nt "$${newest}" ] && newest=$${ks}; \
+ [ ${MKDEBUGKERNEL} = "no" -o \
+ ! -f $${ks}.gdb ] continue; \
+ kernels="$${kernels} $${ks}.gdb"; \
done; \
done; \
[ $${kern_tgz} -nt "$${newest}" ] || { \
diff -r 3e96cc96f910 -r 2f9b7cfe6eed share/mk/bsd.README
--- a/share/mk/bsd.README Mon Dec 20 13:58:58 2021 +0000
+++ b/share/mk/bsd.README Mon Dec 20 14:41:26 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.README,v 1.425 2021/12/05 07:53:57 msaitoh Exp $
+# $NetBSD: bsd.README,v 1.426 2021/12/20 14:41:26 christos Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@@ -185,6 +185,9 @@
with -DDEBUG.
Default: no
+MKDEBUGKERNEL Build .gdb kernels to be included with the kernel sets.
+ Default: no
+
MKDEPINCLUDES If "yes" issue .include statements in the .depend file
instead of inlining the contents of the .d files. Useful
when stale dependencies are present, to list the exact
diff -r 3e96cc96f910 -r 2f9b7cfe6eed share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk Mon Dec 20 13:58:58 2021 +0000
+++ b/share/mk/bsd.own.mk Mon Dec 20 14:41:26 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.1270 2021/12/12 20:33:22 maya Exp $
+# $NetBSD: bsd.own.mk,v 1.1271 2021/12/20 14:41:26 christos Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -1292,7 +1292,7 @@
MKARZERO \
MKBSDGREP \
MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \
- MKDEBUG MKDEBUGLIB MKDTB MKDTRACE \
+ MKDEBUG MKDEBUGKERNEL MKDEBUGLIB MKDTB MKDTRACE \
MKEXTSRC \
MKFIRMWARE \
MKGROFFHTMLDOC \
Home |
Main Index |
Thread Index |
Old Index