1 |
On 16/12/12 22:19, Frank Steinmetzger wrote: |
2 |
> Hello again, |
3 |
> |
4 |
> I would like to include debug info into more of my system, but still not the |
5 |
> whole userland. So I'd like to start with libs. But how do I tell portage do |
6 |
> to it? |
7 |
> I've been using portage/env before for selected packages, namely: |
8 |
> |
9 |
> $ cat /etc/portage/debug-build |
10 |
> CFLAGS="-O2 -march=native -pipe -ggdb" |
11 |
> CXXFLAGS="${CFLAGS}" |
12 |
> FEATURES="${FEATURES} splitdebug" |
13 |
> #USE="${USE} debug" |
14 |
> |
15 |
> and then placing a symlink at portage/env/<category>/<package-name> to point |
16 |
> at the file. But how can I tell portage to use it for whole categories, or |
17 |
> even a group of categories like *libs*? |
18 |
|
19 |
First, clean up all current settings for this (delete all your current |
20 |
symlinks and such.) |
21 |
|
22 |
Then, create a *.conf file in /etc/portage/env/. The name can whatever |
23 |
you want. In this case, "splitdebug.conf" seems appropriate. So make a |
24 |
/etc/portage/env/splitdebug.conf" file with the following contents: |
25 |
|
26 |
CFLAGS="${CFLAGS} -g" |
27 |
CXXFLAGS="${CXXFLAGS} -g" |
28 |
FEATURES="${FEATURES} splitdebug" |
29 |
|
30 |
(Do not set the "debug" USE flag. It's not for getting debug info.) |
31 |
|
32 |
If you really want "-ggdb" instead of just "-g", then use that instead, |
33 |
though it will take more space for no real benefit, unless you actually |
34 |
need the extra debug info for some reason. Note how the file appends |
35 |
the "-g" flag to the existing flags. This way, your usual flags from |
36 |
make.conf are picked up; you don't have manually keep them in sync. |
37 |
|
38 |
Next, create the file "/etc/portage/package.env". In that file, you can |
39 |
list packages that should use a *.conf file you created. In this case, |
40 |
you can do: |
41 |
|
42 |
sys-libs/glibc splitdebug.conf |
43 |
media-libs/libsdl splitdebug.conf |
44 |
# etc. |
45 |
|
46 |
However, portage now also supports wildcards. So you can do stuff like: |
47 |
|
48 |
sys-libs/* splitdebug.conf |
49 |
media-libs/* splitdebug.conf |
50 |
|
51 |
or even: |
52 |
|
53 |
*-libs/* splitdebug.conf |