Gentoo Archives: gentoo-user

From: "Bo Ørsted Andresen" <bo.andresen@××××.dk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Compile something with debugging information
Date: Wed, 20 Jun 2007 10:27:50
Message-Id: 200706201222.10166.bo.andresen@zlin.dk
In Reply to: [gentoo-user] Re: Compile something with debugging information by Alexander Skwar
1 On Tuesday 19 June 2007 13:56:19 Alexander Skwar wrote:
2 > > To debug this, I'd like to build postfix again, but this time portage
3 > > should not strip the binaries and it should be compiled with debugging
4 > > information compiled in (ie. with -g).
5 > >
6 > > How would I do that?
7 >
8 > FEATURES="nostrip -ccache keeptemp keepwork test noclean" \
9 >   CFLAGS="-march=athlon-xp -O0 -pipe -ggdb3" sudo emerge postfix
10 >
11 > This seems to be at least one way to go.
12
13 Why keeptemp keepwork noclean? keeptemp and keepwork are implied by noclean
14 anyway so it's quite redundant. If you just want the source kept have a look
15 at FEATURES=installsources in `man 5 make.conf`. Also have a look at
16 FEATURES=splitdebug as already mentioned. test is unrelated but might of
17 course be useful.
18
19 As mentioned by Daniel you can set FEATURES and CFLAGS on a per package basis
20 in /etc/portage/env/$CATEGORY/$PN. Alternatively you can set it in a
21 case; ...; esac construct in /etc/portage/bashrc (for multiple packages at
22 once). Do note that variables here don't automatically stack so you need to
23 either set everything you want or include $CFLAGS and $FEATURES.
24
25 --
26 Bo Andresen

Attachments

File name MIME type
signature.asc application/pgp-signature