diff options
author | imp <imp@FreeBSD.org> | 2006-09-11 05:35:57 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2006-09-11 05:35:57 +0000 |
commit | f31deb485627174ae762b068d7f9ba068cc7db50 (patch) | |
tree | 663a27691390ad33f17e9811dab2b47717ea524c | |
parent | 1173d87244a5458ccb8c97dfaf4191a0ac1b9eb2 (diff) | |
download | FreeBSD-src-f31deb485627174ae762b068d7f9ba068cc7db50.zip FreeBSD-src-f31deb485627174ae762b068d7f9ba068cc7db50.tar.gz |
Add a knob for compiling the tree -DNDEBUG. This turns off all the
asserts and makes binaries smaller. The binaries also become
repeatable again. As it was, without this md5's of binaries built
with different paths differed.
# Where do I document this?
-rw-r--r-- | share/mk/bsd.lib.mk | 4 | ||||
-rw-r--r-- | share/mk/bsd.own.mk | 1 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index b28930fe..b840152 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -28,6 +28,10 @@ SONAME?= ${SHLIB_NAME} CFLAGS+= ${CRUNCH_CFLAGS} .endif +.if ${MK_ASSERT_DEBUG} == "no" +CFLAGS+= -DNDEBUG +.endif + .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} .endif diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index fda3d61..febb85b 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -282,6 +282,7 @@ WITH_IDEA= # .for var in \ ACPI \ + ASSERT_DEBUG \ ATM \ AUDIT \ AUTHPF \ diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 2485a90..4f241e8 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -10,6 +10,10 @@ CFLAGS+=${COPTS} .endif +.if ${MK_ASSERT_DEBUG} == "no" +CFLAGS+= -DNDEBUG +.endif + .if defined(DEBUG_FLAGS) CFLAGS+=${DEBUG_FLAGS} .endif |