[PATCH 11/15] lpc1768_mbed.cfg: Remove -DNDEBUG flag

Joel Sherrill joel.sherrill at oarcorp.com
Mon Mar 9 19:31:09 UTC 2015



On March 9, 2015 2:25:29 PM CDT, "Marcos Díaz" <marcos.diaz at tallertechnologies.com> wrote:
>Hi!
>
>I wanted to know which warning this raised, and how is the correct way
>to set this flag in production code?

First, there should be no assert's in cpukit so those there should be fixed. I think the same applies for BSPs.

It tripped some warnings for set but not used variables on m68k. I noticed it had -DNDEBUG which it shouldn't have, so I removed them.

Adding it to CFLAGS on the configure line is the best way but there shouldn't have been any.

There is a ticket for the asserts to be removed. 

>Thanks!
>
>
>On Mon, Mar 9, 2015 at 2:38 PM, Joel Sherrill
><joel.sherrill at oarcorp.com> wrote:
>
>---
> c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg
>b/c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg
>index 4cf24c8..a5ed9c6 100644
>--- a/c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg
>+++ b/c/src/lib/libbsp/arm/lpc176x/make/custom/lpc1768_mbed.cfg
>@@ -8,7 +8,7 @@ RTEMS_CPU = arm
>
> CPU_CFLAGS = -march=armv7-m -mthumb
>
>-CFLAGS_OPTIMIZE_V = -O2 -ggdb3 -DNDEBUG
>+CFLAGS_OPTIMIZE_V = -O2 -ggdb3
> BINEXT?=.bin
> # This defines the operations performed on the linked executable.
> # is currently required.
>--
>1.9.3
>
>_______________________________________________
>devel mailing list
>devel at rtems.org
>http://lists.rtems.org/mailman/listinfo/devel
>
>
>
>
>-- 
>
>______________________________
>
> 
>
>
>Marcos Díaz
>
>Software Engineer
>
>
>San Lorenzo 47, 3rd Floor, Office 5
>
>Córdoba, Argentina 
>
>
>Phone: +54 351 4217888 / +54 351 4218211/ +54 351 7617452
>
>Skype: markdiaz22

--joel



More information about the devel mailing list