On Saturday 24 May 2008, Erik Ruotsalainen wrote: > On Sat, May 24, 2008 at 10:02:50AM +0000, dhk wrote: > > How can I modify the CFLAGS before emerging a package? I want to > > add -g2 to the compile of libxml2 so I can step through their > > functions. If I add -g2 to CFLAGS in make.conf it will do it for > > all packages which is not what I want. > > > > Thanks, > > > > Dave > > -- > > [email protected] mailing list > > Same way as with USE flags, I think. > > # CFLAGS="-g2" emerge libxml2
This works, but is not recommended. Portage will not remember those settings in a way that can be duplicated, so the next time that package gets remerged (especially as part of a deep update) it will be recompiled without the custom CFLAGS. This is a serious blunder and non-trivial to detect and fix. It violates the sacrosanct Law Of No Unexpected Side Effects -- Alan McKinnon alan dot mckinnon at gmail dot com -- [email protected] mailing list

