Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Don't optimize code in debug build

From: Piotr Krukowiecki <hidden>
Date: 2016-06-15 22:50:33

(forgot about the list when replying)
On Sun, Feb 13, 2011 at 10:36 AM, Johannes Sixt [off-list ref] wrote:
quoted
On Sonntag, 13. Februar 2011, Piotr Krukowiecki wrote:
quoted
--- a/Makefile
+++ b/Makefile
@@ -262,7 +262,10 @@ endif
 # CFLAGS and LDFLAGS are for the users to override from the command line.

-CFLAGS = -g -O2 -Wall
+CFLAGS = -g -Wall
+ifndef DEBUG
+CFLAGS += -O2
+endif
 LDFLAGS =
 ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
Instead of this, you can just write

 CFLAGS = -g -Wall

in your config.mak. Is anything wrong with that?
Several things: I need to know I should remove -O2, I need to keep in
sync with other default options, current default is less useful, it
requires me to do extra steps.
DEBUG is kind of standard - Makefile already uses it in Windows
specific part. I suppose we want to keep consistent.

-- 
Piotrek
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help