Gentoo Archives: gentoo-user

From: Sebastian Magri <sebasmagri@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Setting CFLAGS for a single build
Date: Sat, 24 May 2008 16:50:00
Message-Id: 5cf51b790805240949u48717e5er172e7f8a447dffe0@mail.gmail.com
In Reply to: Re: [gentoo-user] Setting CFLAGS for a single build by Alan McKinnon
1 2008/5/25 Alan McKinnon <alan.mckinnon@×××××.com>:
2
3 > On Saturday 24 May 2008, Erik Ruotsalainen wrote:
4 > > On Sat, May 24, 2008 at 10:02:50AM +0000, dhk wrote:
5 > > > How can I modify the CFLAGS before emerging a package? I want to
6 > > > add -g2 to the compile of libxml2 so I can step through their
7 > > > functions. If I add -g2 to CFLAGS in make.conf it will do it for
8 > > > all packages which is not what I want.
9 > > >
10 > > > Thanks,
11 > > >
12 > > > Dave
13 > > > --
14 > > > gentoo-user@l.g.o mailing list
15 > >
16 > > Same way as with USE flags, I think.
17 > >
18 > > # CFLAGS="-g2" emerge libxml2
19 >
20 > This works, but is not recommended.
21 >
22 > Portage will not remember those settings in a way that can be
23 > duplicated, so the next time that package gets remerged (especially as
24 > part of a deep update) it will be recompiled without the custom CFLAGS.
25 >
26 > This is a serious blunder and non-trivial to detect and fix. It violates
27 > the sacrosanct Law Of No Unexpected Side Effects
28 >
29 > Alan is rigth, the best practice is not to declare any environment variable
30 or USE Flag before the emerge sentence, but use the configuration files in
31 "/etc/portage"
32
33 >
34 > --
35 > Alan McKinnon
36 > alan dot mckinnon at gmail dot com
37 >
38 > --
39 > gentoo-user@l.g.o mailing list
40 >
41 >
42
43
44 --
45 En el pasado creímos que se nos acababa
46 el petróleo, pero en realidad lo que se nos
47 acababan eran las IDEAS.
48 Gentoo/* (Linux #455615)
49 53:04:4e:b5:f9:7e:4a:fb:66:a2:19:12:da:d5:97:f8
50 8A3A C955 715D D88A 87CD E21F F827 ADD7 F589 B4A4
51 Sebastian Magri (sebasmagri) <sebasmagri@×××××.com>

Replies

Subject Author
Re: [gentoo-user] Setting CFLAGS for a single build maxim wexler <blissfix@×××××.com>