Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc Put back the code to add DEBUG=-g in config and to add t...



details:   https://anonhg.NetBSD.org/src/rev/4706faf200d6
branches:  trunk
changeset: 1029146:4706faf200d6
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 23 14:50:59 2021 +0000

description:
Put back the code to add DEBUG=-g in config and to add the debug kernels
in the kernel sets. Having the .gdb kernels in the EXTRA_KERNELS does not
work, since we only walk through the standard kernels in the Makefile. Also
doing DEBUG=-g in config twice does not hurt.

diffstat:

 etc/Makefile |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r e1f59c77c9f6 -r 4706faf200d6 etc/Makefile
--- a/etc/Makefile      Thu Dec 23 11:05:58 2021 +0000
+++ b/etc/Makefile      Thu Dec 23 14:50:59 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.454 2021/12/20 20:20:35 christos Exp $
+#      $NetBSD: Makefile,v 1.455 2021/12/23 14:50:59 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}" ] || { \



Home | Main Index | Thread Index | Old Index