diff --git a/servers/vfs/vnode.c b/servers/vfs/vnode.c index b98ff2572..9e1a9e03a 100644 --- a/servers/vfs/vnode.c +++ b/servers/vfs/vnode.c @@ -16,6 +16,11 @@ #include /* Is vnode pointer reasonable? */ +#if NDEBUG +#define SANEVP(v) +#define CHECKVN(v) +#define ASSERTVP(v) +#else #define SANEVP(v) ((((v) >= &vnode[0] && (v) < &vnode[NR_VNODES]))) #define BADVP(v, f, l) printf("%s:%d: bad vp %p\n", f, l, v) @@ -29,6 +34,7 @@ /* vp check that panics */ #define ASSERTVP(v) if(!SANEVP(v)) { \ BADVP(v, __FILE__, __LINE__); panic("bad vp"); } +#endif /*===========================================================================* * get_free_vnode * diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index f81646817..724ebdf26 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -16,6 +16,10 @@ AFLAGS += ${SMP_FLAGS} MAKECONF?= /etc/make.conf .-include "${MAKECONF}" +.ifdef NOASSERTS +CFLAGS += -DNDEBUG=1 +.endif + # # CPU model, derived from MACHINE_ARCH # diff --git a/tools/chrootmake.sh b/tools/chrootmake.sh index 4f07698e0..c030dc059 100755 --- a/tools/chrootmake.sh +++ b/tools/chrootmake.sh @@ -8,7 +8,7 @@ then make $@ exit $? fi -make world +make NOASSERTS=yes world cd tools rm revision rm /boot/image/*