|
From: | Ivan Vučica |
Subject: | Re: common.make -- debug=yes |
Date: | Sun, 21 Aug 2016 23:38:39 +0100 |
On Aug 18, 2016 7:14 PM, "Ivan Vučica" <address@hidden> wrote:
> Also, when debugging information is needed, you are typically debugging and would preferably want to have the execution to be in order. At least that's my expectation. Rarely - but not never - would I find optimisation + debuginfo useful.
I actually think the opposite to be true. Whatever the case, i think GNUstep make should honor the intent of the person compiling the code. If I set -O1 and debug=yes, I would expect the executable to be optimized to level 1, regardless of debugging symbols.
A few examples:
1. Distributed binaries: most distributions compile with "-O2 -g" and later remove debugging info from the binary to a different file. This saves space and still allows debugging to happen on production code.
2. Debugging real code: we often see, even on this list, cases where crashes can't be reproduced in debugging mode. To avoid adding another unknown (optimized vs unoptimized code) to the equation, the only thing debug=yes should do is add debugging info.
3. Convention: GNU autotools uses "-O2 -g" if CFLAGS is not given. Most folks compiling their own code are going to expect that to be the case, and doing things differently might cause more confusion.Additionally, I think it is a reasonable expectation that debug=yes isn't going to do anything but add debugging symbols to the binary.
Just a few thoughts.
[Prev in Thread] | Current Thread | [Next in Thread] |