tech-kern archive

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

DIAGNOSTIC for modules (Re: CVS commit: src/sys/dev/usb)



Hi,

As Martin pointed out, it is useful for debugging to turn on
DIAGNOSTIC for modules (for non-release branches).

Now, all modules for amd64 are successfully built with DIAGNOSTIC.

I'd like to commit the patch below, if there's no objection.

Thanks,
rin
----
Index: sys/modules/Makefile.inc
===================================================================
RCS file: /home/netbsd/src/sys/modules/Makefile.inc,v
retrieving revision 1.6
diff -p -u -r1.6 Makefile.inc
--- sys/modules/Makefile.inc	11 Sep 2011 18:38:02 -0000	1.6
+++ sys/modules/Makefile.inc	10 Feb 2019 11:39:11 -0000
@@ -5,6 +5,10 @@ CPPFLAGS+=	-I${NETBSDSRCDIR}/common/incl
 USE_FORT=	no
 WARNS?=		3
+# inexpensive kernel consistency checks
+# XXX to be commented out on release branch
+CPPFLAGS+=	-DDIAGNOSTIC
+
 .if !empty(IOCONF)
 _BSD_IOCONF_MK_USER_=1
 .include <bsd.ioconf.mk>

On 2019/02/09 23:13, Martin Husemann wrote:
On Sat, Feb 09, 2019 at 11:53:57AM +0100, Michael van Elst wrote:
And that's why I see it for modules:

Index: sys/modules/Makefile.inc
===================================================================
RCS file: /cvsroot/src/sys/modules/Makefile.inc,v
retrieving revision 1.6
diff -p -u -r1.6 Makefile.inc
--- sys/modules/Makefile.inc    11 Sep 2011 18:38:02 -0000      1.6
+++ sys/modules/Makefile.inc    9 Feb 2019 10:53:03 -0000
@@ -1,7 +1,7 @@
  #      $NetBSD: Makefile.inc,v 1.6 2011/09/11 18:38:02 mbalmer Exp $
S!= cd ${.PARSEDIR}/..;pwd
-CPPFLAGS+=     -I${NETBSDSRCDIR}/common/include
+CPPFLAGS+=     -I${NETBSDSRCDIR}/common/include -DDIAGNOSTIC
  USE_FORT=      no
  WARNS?=                3

How about you commit that for HEAD and we remove it on branches for the
first non-beta build (like we remove options DIAGOSTIC from lots of kernels)?

Martin




Home | Main Index | Thread Index | Old Index