1 |
Maciej Mrozowski <reavertm@××××××.fm> writes: |
2 |
|
3 |
> - USE=debug is useless when CFLAGS/LDFLAGS or FEATURES are not appropriate |
4 |
|
5 |
What are you saying here? I'm afraid you're mistaken here. |
6 |
|
7 |
For the most part, USE=debug means "enable debug code paths", which for |
8 |
lots of projects simply means "enable assertions"; there are packages |
9 |
that take this as "enable debug symbols too" but I don't think that's |
10 |
very valid since users might want debug code paths but not symbols and |
11 |
vice-versa (I indeed have debug symbols bug no debug codepaths enabled). |
12 |
|
13 |
Now just to make sure the common misconceptions don't hit again: |
14 |
|
15 |
- -ggdb *does not have any runtime performance hit*; neither in |
16 |
execution time nor in memory usage; the debug sections are not mapped |
17 |
into memory at all; this is true for both non-stripped and split |
18 |
executables; |
19 |
- -O0 is not always a good idea; beside bugs in packages concealed by |
20 |
-O1+ [1], there are some further points: missing registers on x86 |
21 |
causes build failures, and if ( 0 ) cases are not optimised away, |
22 |
resulting in stuff like FFmpeg not to link properly since undefined |
23 |
references are not pruned away; this means that using -O0 |
24 |
unconditionally for any package for debug is not really an option; |
25 |
|
26 |
[1] http://blog.flameeyes.eu/2008/09/02/testing-the-corner-cases |
27 |
|
28 |
-- |
29 |
Diego "Flameeyes" Pettenò |
30 |
http://blog.flameeyes.eu/ |