Valgrind On Gentoo: Perpackage splitdebug

| 分类 Utility  | 标签 gentoo  valgrind 

https://archives.gentoo.org/gentoo-user/message/f456c607cb337b10fd0a8afec7bc4712

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

上一篇     下一篇