Gentoo Archives: gentoo-user

From: maxim wexler <blissfix@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Setting CFLAGS for a single build
Date: Sun, 25 May 2008 02:51:09
Message-Id: 659227.75505.qm@web31705.mail.mud.yahoo.com
In Reply to: Re: [gentoo-user] Setting CFLAGS for a single build by Sebastian Magri
1 --- On Sun, 5/25/08, Sebastian Magri <sebasmagri@×××××.com> wrote:
2
3 > From: Sebastian Magri <sebasmagri@×××××.com>
4 > Subject: Re: [gentoo-user] Setting CFLAGS for a single build
5 > To: gentoo-user@l.g.o
6 > Date: Sunday, May 25, 2008, 1:49 AM
7 > 2008/5/25 Alan McKinnon <alan.mckinnon@×××××.com>:
8 >
9 > > On Saturday 24 May 2008, Erik Ruotsalainen wrote:
10 > > > On Sat, May 24, 2008 at 10:02:50AM +0000, dhk
11 > wrote:
12 > > > > How can I modify the CFLAGS before emerging
13 > a package? I want to
14 > > > > add -g2 to the compile of libxml2 so I can
15 > step through their
16 > > > > functions. If I add -g2 to CFLAGS in
17 > make.conf it will do it for
18 > > > > all packages which is not what I want.
19 > > > >
20 > > > > Thanks,
21 > > > >
22 > > > > Dave
23 > > > > --
24 > > > > gentoo-user@l.g.o mailing list
25 > > >
26 > > > Same way as with USE flags, I think.
27 > > >
28 > > > # CFLAGS="-g2" emerge libxml2
29 > >
30 > > This works, but is not recommended.
31 > >
32 > > Portage will not remember those settings in a way that
33 > can be
34 > > duplicated, so the next time that package gets
35 > remerged (especially as
36 > > part of a deep update) it will be recompiled without
37 > the custom CFLAGS.
38 > >
39 > > This is a serious blunder and non-trivial to detect
40 > and fix. It violates
41 > > the sacrosanct Law Of No Unexpected Side Effects
42 > >
43 > > Alan is rigth, the best practice is not to declare any
44 > environment variable
45 > or USE Flag before the emerge sentence, but use the
46 > configuration files in
47 > "/etc/portage"
48 >
49
50 Interesting discussion. I'm glad I peeked in.
51
52 Here's some more treatment:
53
54 http://gentoo-wiki.com/CflagsExceptions
55
56 -mw
57
58
59
60
61
62 --
63 gentoo-user@l.g.o mailing list