Gentoo Archives: gentoo-dev

From: Sven Eden <sven.eden@×××.de>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Defaulting for debug information in profiles
Date: Tue, 18 Dec 2012 11:13:31
Message-Id: 1476838.ykBjVqnuen@sed-notebook
In Reply to: Re: [gentoo-dev] Defaulting for debug information in profiles by Walter Dnes
1 Am Montag, 17. Dezember 2012, 11:48:12 schrieb Walter Dnes:
2 > On Mon, Dec 17, 2012 at 01:37:27PM +0100, Sven Eden wrote
3 >
4 > > 1) --- kde-base/kate
5 > > -----------------------------
6 > >
7 > > Compiled with -ggdb in CFLAGS:
8 > > # sum=0; for file in $(equery f kde-base/kate | grep "\.debug") ; do
9 > >
10 > > xSize=$(stat -c "%s" $file) ; sum=$((sum+xSize)) ; done ; echo "$sum"
11 > > 32652140
12 > >
13 > > Compiled with -g in CFLAGS:
14 > > # sum=0; for file in $(equery f kde-base/kate | grep "\.debug") ; do
15 > >
16 > > xSize=$(stat -c "%s" $file) ; sum=$((sum+xSize)) ; done ; echo "$sum"
17 > > 32652140
18 > >
19 > > Result: No size change at all.
20 > >
21 > >
22 > > 2) --- dev-libs/lzo
23 > > -----------------------------
24 > >
25 > > Compiled with -ggdb in CFLAGS:
26 > > # sum=0; for file in $(equery f dev-libs/lzo | grep "\.debug") ; do
27 > >
28 > > xSize=$(stat -c "%s" $file) ; sum=$((sum+xSize)) ; done ; echo "$sum"
29 > > 558664
30 > >
31 > > Compiled with -g in CFLAGS:
32 > > # sum=0; for file in $(equery f dev-libs/lzo | grep "\.debug") ; do
33 > >
34 > > xSize=$(stat -c "%s" $file) ; sum=$((sum+xSize)) ; done ; echo "$sum"
35 > > 558304
36 > >
37 > >
38 > > Result: A difference of 260 bytes or 0.06%. Far away from the assumed
39 > > 300%.
40 > >
41 > >
42 > > Conclusion:
43 > > I do not doubt that -ggdb adds size. It does. And maybe, if I did an
44 > > emerge -e @world would reduce the size used on my system between 30% and
45 > > 40%. But not about 66% like assumed.
46 > >
47 > >
48 > > However, even if it where "around 5-6" G, it would be thrice the initial
49 > > assumption of 2G. And that's the whole point.
50 >
51 > On my 32-bit machines I have...
52 >
53 > FLAGS="-O2 -march=native -mfpmath=sse -fomit-frame-pointer -pipe
54 > -fno-unwind-tables -fno-asynchronous-unwind-tables" CXXFLAGS="${CFLAGS}"
55 >
56 > See http://comments.gmane.org/gmane.linux.busybox/36695 for why I
57 > include "-fno-unwind-tables -fno-asynchronous-unwind-tables". Would I
58 > have to rebuild system and world without...
59 >
60 > -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables
61 >
62 > ...to have debug data available?
63
64 No, you haven't, if you have compiled everything with "-g" or "-ggdb".
65
66 According to the web page you linked, the DWARF-2 tables are then written into
67 the .debug files. Without -g/-ggdb, they are stripped and no longer available
68 for debugging.
69
70 So according to your CFLAGS, you'd have to rebuild everything, yes, but a
71 simple "-g" would do.
72
73 Oh, and "splitdebug" in "FEATURES" would be a good idea, too! ;)
74
75 Sincerly
76
77 Sven
78
79
80 --
81 http://pwxlib.sourceforge.net

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Defaulting for debug information in profiles "Marcin Mirosław" <marcin@×××××.pl>