Skip to contentSkip to conversation

build: Added -UNDEBUG to tools/Android.mk

PATCH In review [email protected] 3 participants 4 messages Jan 8, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Added -UNDEBUG to tools/Android.mk

From: Devon Davies <[email protected]>

NDEBUG is defined by default in Android and causes assert(x) to be defined as void(x). This change ensures that asserts work as expected in tools.

This flag is already inside tests/Android.mk

---
 tools/Android.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/Android.mk +1 -1
index 4a19b6c..5bda489 100644
@@ -40,7 +40,7 @@ define add_tool
 
     LOCAL_CFLAGS += -DHAVE_TERMIOS_H
     LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
-    LOCAL_CFLAGS += -DANDROID
+    LOCAL_CFLAGS += -DANDROID -UNDEBUG
     LOCAL_CFLAGS += -std=c99
     # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
     LOCAL_CFLAGS += -Wno-error=return-type
Signature · 12 lines
1.7.9.5

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#1 lore raw
Quoted 9 lines · On Wed, Jan 08, 2014 at 04:07:06PM +0000, [email protected] wrote:

From: Devon Davies <[email protected]>

NDEBUG is defined by default in Android and causes assert(x) to be defined as void(x). This change ensures that asserts work as expected in tools.

This flag is already inside tests/Android.mk

Hi Oscar,

The change looks good from here, mind dropping a Reviewed-By tag as you were the one looking at that in the first place?

Thanks,

Signature · 1 line
Damien
Quoted 35 lines
---
 tools/Android.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/Android.mk +1 -1
index 4a19b6c..5bda489 100644
@@ -40,7 +40,7 @@ define add_tool
 
     LOCAL_CFLAGS += -DHAVE_TERMIOS_H
     LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
-    LOCAL_CFLAGS += -DANDROID
+    LOCAL_CFLAGS += -DANDROID -UNDEBUG
     LOCAL_CFLAGS += -std=c99
     # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
     LOCAL_CFLAGS += -Wno-error=return-type
Signature · 17 lines
1.7.9.5

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 8 lines

-----Original Message-----
From: [email protected] [mailto:intel-gfx- [email protected]] On Behalf Of [email protected]
Sent: Wednesday, January 08, 2014 4:07 PM
To: [email protected]
Cc: Davies, Devon
Subject: [Intel-gfx] [PATCH] build: Added -UNDEBUG to tools/Android.mk

Quoted 6 lines

From: Devon Davies <[email protected]>

NDEBUG is defined by default in Android and causes assert(x) to be defined as void(x). This change ensures that asserts work as expected in tools.

This flag is already inside tests/Android.mk

I discussed and agreed to Devon´s solution with him before, so:

Quoted 25 lines
---
 tools/Android.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/Android.mk index 4a19b6c..5bda489 renamed from tools/Android.mk +0 -0

100644

tools/Android.mk +1 -2
@@ -40,7 +40,7 @@ define add_tool
 
     LOCAL_CFLAGS += -DHAVE_TERMIOS_H
     LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
-    LOCAL_CFLAGS += -DANDROID
+    LOCAL_CFLAGS += -DANDROID -UNDEBUG
     LOCAL_CFLAGS += -std=c99
     # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
     LOCAL_CFLAGS += -Wno-error=return-type
--

1.7.9.5

---------------------------------------------------------------------
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 10 lines · Oscar
Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:intel-gfx- [email protected]] On Behalf Of [email protected]
Sent: Wednesday, January 08, 2014 4:07 PM
To: [email protected]
Cc: Davies, Devon
Subject: [Intel-gfx] [PATCH] build: Added -UNDEBUG to tools/Android.mk

From: Devon Davies <[email protected]>

Quoted 7 lines
Quoted 4 lines

NDEBUG is defined by default in Android and causes assert(x) to be defined as void(x). This change ensures that asserts work as expected in tools.

This flag is already inside tests/Android.mk

I discussed and agreed to Devon´s solution with him before, so:

Thanks for the patch and review, pushed.

Signature · 1 line
Damien