From: Ian Jackson Subject: [PATCH] -DNDEBUG for hypervisor only Date: Tue, 15 Jan 2008 17:07:35 +0000 Message-ID: <18316.59479.739173.981739@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="NtlaM0WaC5" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --NtlaM0WaC5 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit IMO in general use of -DNDEBUG to disable assert() is not good practice in userland code. The attached patch applies this flag to the hypervisor only, by moving the setting from Config.mk to Rules.mk. Ian. Signed-off-by: Ian Jackson --NtlaM0WaC5 Content-Type: text/plain Content-Description: -DNDEBUG hypervisor only Content-Disposition: inline; filename="xen-ndebug-hypervisor-only.patch" Content-Transfer-Encoding: 7bit Index: xen-unstable.hg/Config.mk =================================================================== --- xen-unstable.hg.orig/Config.mk 2008-01-15 16:27:36.000000000 +0000 +++ xen-unstable.hg/Config.mk 2008-01-15 16:28:06.000000000 +0000 @@ -57,9 +57,7 @@ endif endef -ifneq ($(debug),y) -CFLAGS += -DNDEBUG -else +ifeq ($(debug),y) CFLAGS += -g endif Index: xen-unstable.hg/xen/Rules.mk =================================================================== --- xen-unstable.hg.orig/xen/Rules.mk 2008-01-15 16:27:33.000000000 +0000 +++ xen-unstable.hg/xen/Rules.mk 2008-01-15 16:28:08.000000000 +0000 @@ -17,6 +17,8 @@ ifeq ($(debug),y) verbose := y frame_pointer := y +else +CFLAGS += -DNDEBUG endif ifeq ($(perfc_arrays),y) perfc := y --NtlaM0WaC5 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --NtlaM0WaC5--