WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] -DNDEBUG for hypervisor only

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] -DNDEBUG for hypervisor only
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 15 Jan 2008 17:07:35 +0000
Delivery-date: Tue, 15 Jan 2008 09:12:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <ian.jackson@xxxxxxxxxxxxx>

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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] -DNDEBUG for hypervisor only, Ian Jackson <=