1 |
On 08/23/2011 09:17 AM, Leonardo Guilherme wrote: |
2 |
> Hi. |
3 |
> |
4 |
> I've turned on splitdebug feature (and -ggdb in CFLAGS) so debug |
5 |
> information are saved and I can debug anything that crashes. I went to |
6 |
> /usr/lib/debug, just out of curiosity, to see how much space was taken |
7 |
> and I found that it was almost 2GB, which chromium + firefox adds up |
8 |
> 1.5GB and python gets another 0.3. I would like to disable splitdebug |
9 |
> for these specific packages now and in the future, so removing |
10 |
> splitdebug from features, re-emerging them and then activating |
11 |
> splitdebug again won't quite cut. |
12 |
> |
13 |
> I wonder if there's a way to active features to some specific |
14 |
> packages, just like USE flags. |
15 |
|
16 |
There is. And it's a very powerful one even. First, remove -ggdb (I |
17 |
use just -g though; if you don't need the extra info -ggdb gives, plain |
18 |
-g will save you some space and time) from your CFLAGS and splitdebug |
19 |
from your FEATURES in make.conf. Then, create a file: |
20 |
|
21 |
/etc/portage/env/splitdebug.conf |
22 |
|
23 |
with the following contents: |
24 |
|
25 |
CFLAGS="${CFLAGS} -ggdb" |
26 |
CXXFLAGS="${CXXFLAGS} -ggdb" |
27 |
FEATURES="${FEATURES} splitdebug" |
28 |
|
29 |
Now, in /etc/portage/package.env, you can "execute" splitdebug.conf for |
30 |
the packages you want. My package.env for example looks like: |
31 |
|
32 |
sys-libs/glibc splitdebug.conf |
33 |
media-libs/mesa splitdebug.conf |
34 |
kde-base/kdelibs splitdebug.conf |
35 |
kde-base/kwin splitdebug.conf |
36 |
|
37 |
The result is that, for example, when glibc is emerged, splitdebug.conf |
38 |
is executed which adds -ggdb to CFLAGS and CXXFLAGS (do not forget |
39 |
CXXFLAGS!) and splitdebug to FEATURES. |
40 |
|
41 |
As you can guess, you can create arbitrary .conf files like this; it |
42 |
isn't in any way specific to splitdebug. |