On 16/12/12 22:19, Frank Steinmetzger wrote:
Hello again,
I would like to include debug info into more of my system, but still not the
whole userland. So I'd like to start with libs. But how do I tell portage do
to it?
I've been using portage/env before for selected packages, namely:
$ cat /etc/portage/debug-build
CFLAGS="-O2 -march=native -pipe -ggdb"
CXXFLAGS="${CFLAGS}"
FEATURES="${FEATURES} splitdebug"
#USE="${USE} debug"
and then placing a symlink at portage/env/<category>/<package-name> to point
at the file. But how can I tell portage to use it for whole categories, or
even a group of categories like *libs*?
First, clean up all current settings for this (delete all your current
symlinks and such.)
Then, create a *.conf file in /etc/portage/env/. The name can whatever
you want. In this case, "splitdebug.conf" seems appropriate. So make a
/etc/portage/env/splitdebug.conf" file with the following contents:
CFLAGS="${CFLAGS} -g"
CXXFLAGS="${CXXFLAGS} -g"
FEATURES="${FEATURES} splitdebug"
(Do not set the "debug" USE flag. It's not for getting debug info.)
If you really want "-ggdb" instead of just "-g", then use that instead,
though it will take more space for no real benefit, unless you actually
need the extra debug info for some reason. Note how the file appends
the "-g" flag to the existing flags. This way, your usual flags from
make.conf are picked up; you don't have manually keep them in sync.
Next, create the file "/etc/portage/package.env". In that file, you can
list packages that should use a *.conf file you created. In this case,
you can do:
sys-libs/glibc splitdebug.conf
media-libs/libsdl splitdebug.conf
# etc.
However, portage now also supports wildcards. So you can do stuff like:
sys-libs/* splitdebug.conf
media-libs/* splitdebug.conf
or even:
*-libs/* splitdebug.conf