Module Name:    src
Committed By:   martin
Date:           Mon May  5 19:06:29 UTC 2014

Modified Files:
        src/share/mk: bsd.README
        src/sys/conf: Makefile.kern.inc

Log Message:
As discussed on tech-toolchain, offer a new make variable MKKDEBUG - if
set to "yes", kernel builds will gain debug info and a netbsd.gdb will
be created (same as adding "makeoptions DEBUG=-g" to the config file).


To generate a diff of this commit:
cvs rdiff -u -r1.330 -r1.331 src/share/mk/bsd.README
cvs rdiff -u -r1.167 -r1.168 src/sys/conf/Makefile.kern.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.330 src/share/mk/bsd.README:1.331
--- src/share/mk/bsd.README:1.330	Fri Apr 18 00:37:46 2014
+++ src/share/mk/bsd.README	Mon May  5 19:06:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.330 2014/04/18 00:37:46 christos Exp $
+#	$NetBSD: bsd.README,v 1.331 2014/05/05 19:06:29 martin Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -234,6 +234,10 @@ MKISCSI		If "no", don't build or install
 		(depends on libpthread.)
 		Default: yes
 
+MKKDEBUG	If "yes", force building of kernel symbol info and creation
+		of netbsd.gdb in all kernel builds, independently of the
+		settings for "makeoptions DEBUG" in the kernel config file.
+
 MKKERBEROS	If "no", disables building of Kerberos v5
 		infrastructure (libraries and support programs).
 		Default: yes

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.167 src/sys/conf/Makefile.kern.inc:1.168
--- src/sys/conf/Makefile.kern.inc:1.167	Mon Mar 10 02:36:50 2014
+++ src/sys/conf/Makefile.kern.inc	Mon May  5 19:06:29 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.167 2014/03/10 02:36:50 ozaki-r Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.168 2014/05/05 19:06:29 martin Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -17,6 +17,11 @@
 #
 # all ports are expected to include bsd.own.mk for toolchain settings
 
+# Default DEBUG to -g if kernel debug info is requested by MKKDEBUG=yes
+.if defined(MKKDEBUG) && ${MKKDEBUG} == "yes"
+DEBUG?=-g
+.endif
+
 ##
 ## (0) toolchain settings for things that aren't part of the standard
 ## toolchain

Reply via email to