1 |
Nikos Chantziaras writes: |
2 |
|
3 |
> Is there a way to enable debugging symbols only for some packages? I |
4 |
> need to do that for about 15 packages. Currently, all I can do is edit |
5 |
> make.conf all the time when emerging one of those and add "-g" to CFLAGS |
6 |
> and "splitdebug" to FEATURES. But I *always* forget about it the first |
7 |
> time, ending up building twice. |
8 |
|
9 |
This is possible. I have the problem that older GCCs do not know about |
10 |
the -march=k8-sse3 CFLAG, so I had to change this to build them. So, I |
11 |
created the file /etc/portage/env/sys-devel/gcc:3.4, containing this: |
12 |
|
13 |
touch /tmp/package.env-gcc:3.4 |
14 |
CFLAGS="-march=k8" |
15 |
CXXFLAGS=$CFLAGS |
16 |
|
17 |
The files can contain any bash code. I added the touch comand in order |
18 |
to verify that this code is actually being used. You could put this |
19 |
inside there: |
20 |
|
21 |
CFLAGS="$CFLAGS -g" |
22 |
CXXFLAGS=$CFLAGS |
23 |
FEATURES="$FEATURES splitdebug" |
24 |
|
25 |
This seems to work for me. The portage man page has some info about |
26 |
this, it also mentions /etc/portage/package.env containing lines like |
27 |
<category>/<package> <conffile> |
28 |
with <file> being /etc/portage/env/<conffile>. It suggests to use this |
29 |
instead of my approach I described above. I did not use this yet, I |
30 |
assume it should be used when making generic changes for a package, but |
31 |
as I want the change not for all GCCs, but only for certain slots, I use |
32 |
the method I described. |
33 |
|
34 |
I'm using portage-2.2 BTW. |
35 |
|
36 |
Wonko |