Gentoo Archives: gentoo-dev

From: Mart Raudsepp <leio@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
Date: Fri, 30 May 2008 21:48:30
Message-Id: 1212184064.13925.15.camel@localhost
In Reply to: Re: [gentoo-dev] Re: RFC: Should preserve-libs be enabled by default? by Ciaran McCreesh
1 On R, 2008-05-30 at 22:37 +0100, Ciaran McCreesh wrote:
2 > On Sat, 31 May 2008 00:31:22 +0300
3 > Mart Raudsepp <leio@g.o> wrote:
4 > > On R, 2008-05-30 at 20:20 +0100, Ciaran McCreesh wrote:
5 > > > On Fri, 30 May 2008 21:13:32 +0200
6 > > > Luca Barbato <lu_zero@g.o> wrote:
7 > > > > Talk to the upstream about this, probably getting a satisfying
8 > > > > solution isn't that difficult.
9 > > >
10 > > > The solution is to use --as-needed in the same way that -ffast-math
11 > > > is used: only with applications specifically designed to support it.
12 > >
13 > > You mean everything but paludis?
14 >
15 > Paludis is fine with as-needed. But hey, don't let reality get in the
16 > way of your pathetic attempts at turning everything into Paludis
17 > bashing.
18
19 It happens to be the only package that I know of that couldn't be fixed
20 to work with --as-needed (fix for others being to actually state linking
21 with a library whose symbols are directly used). I have not heard of
22 anything else.
23
24 > > Doesn't your grand plan include supporting Prefix and Interix with PE
25 > > binaries and so on?
26 >
27 > I have no particular interest in supporting any platform that can't
28 > ship a Standard-compliant C++ environment.
29
30 That doesn't mean Gentoo progress, in maintainability of a running
31 system through the ease of ABI breaks meaning magnitudes of less
32 recompilations, should be inhibited.
33
34 > > I know projects that need to work around static initialization not
35 > > being reliable - they only happen to have done that for other reasons
36 > > (such as Windows PE format, iirc) years before --as-needed was
37 > > implemented for binutils.
38 > > Standards is one thing - reality is something quite different.
39 > > The reality is that everything designed to work everywhere is just
40 > > mighty happy with --as-needed and lots of benefits to gain from it.
41 >
42 > And twenty years ago C++ had to work around linkers that only supported
43 > eight character symbol names. Reality moves forward, except in
44 > situations like these where people try to rice it backwards.
45
46 Maybe you'd like to tell that to the authors of the platforms that don't
47 support this extreme corner case, but are amongst the platforms that we
48 do somewhat support in Gentoo?
49
50 The story that matters here is, that a C++ corner case that does not
51 work on 0.01% of packages with --as-needed and breaks on non-ELF
52 platforms, should not cause good things for our users to be shot down.
53
54 99.9% packages in the tree work just great with --as-needed with many
55 benefits, including ABI break pain reduction (and less importantly
56 memory savings from dirty library private memory pages), so given that
57 percentage the default should be what makes things better for users with
58 exceptions for those tiny percentage of packages that fall into the
59 corner case (that break on more exotic platforms anyway and arguably
60 should be fixed).
61
62 Portage developers - is there anything we should do to get --as-needed
63 to make.conf.example and other places, beyond fixing the known bugs on
64 the appropriate bug tracker?
65
66 --
67 Mart Raudsepp
68 Gentoo Developer
69 Mail: leio@g.o
70 Weblog: http://planet.gentoo.org/developers/leio
71
72 --
73 gentoo-dev@l.g.o mailing list

Replies