Gentoo Archives: gentoo-amd64

From: Frank Peters <frank.peters@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: Please suggest settings and flags in /etc/make.conf?
Date: Fri, 22 Jan 2010 13:39:39
In Reply to: [gentoo-amd64] Re: Please suggest settings and flags in /etc/make.conf? by Duncan <>
1 On Fri, 22 Jan 2010 12:49:27 +0000 (UTC)
2 Duncan <1i5t5.duncan@×××.net> wrote:
4 >
5 > Meanwhile, it's also worth considering LDFLAGS. Here's mine:
6 >
7 > LDFLAGS="-Wl,-z,now,--as-needed,-O1,--hash-style=gnu,--sort-common"
8 >
9 > --as-needed is the one most folks will be interested in. There's talk of
10 > eventually making this the Gentoo default, as it can DRAMATICALLY reduce
11 > the number of reverse dependency breakage of the sort revdep-rebuild
12 > fixes. I'm talking an order of magnitude reduction, having to rebuild
13 > maybe 1/10 of the packages that would have to be rebuilt without it.
14 > Problems with this one should now be quite rare indeed,
15 >
17 I've been using the "--as-needed" option for some time now and
18 probably most of my system has been rebuilt with it.
20 In my experience, the only package where "--as-needed" causes
21 problems is libdrm, which will not compile using this option.
22 The solution is to define a specific LDFLAGS variable without
23 "--as-needed" just for libdrm in the /etc/portage/env directory.
25 I forget what this method is called, but using the /etc/portage/env
26 directory is one way to allow CFLAGS, LDFLAGS, etc. to be
27 customized for individual packages.
29 Another example of this kind of customization is that both Python
30 and Sqlite supposedly perform better with "-O3" in the CFLAGS variable.
31 By making an appropriate entry into /etc/portage/env one can specify
32 "-O3" just for these packages but use "-O2" for all other packages.
34 Frank Peters