Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
Date: Sat, 31 May 2008 00:30:25
Message-Id: 20080531013016.4aceedbb@snowcone
In Reply to: Re: [gentoo-dev] RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?) by Luca Barbato
1 On Sat, 31 May 2008 02:17:15 +0200
2 Luca Barbato <lu_zero@g.o> wrote:
3 > Ciaran McCreesh wrote:
4 > > Linking with as-needed is the stage in which the elimination occurs,
5 > > and as-needed is the cause of the elimination. So yes, it is
6 > > related.
7 >
8 > The linker just does bookkeeping, if there aren't symbols used, the
9 > library won't be in the list.
11 Which is where the design flaw is -- as-needed incorrectly assumes that
12 the only type of dependency between shared objects is a name
13 dependency. This isn't true with C++ static initialisers.
15 > >> Still, PE and ELF are older than the first C++ spec so, IFF your
16 > >> reading of this chapter is correct, C++ is broken by design.
17 > >
18 > > Not at all. Read "The Design and Evolution of C++", and you shall
19 > > see that requiring changes to the linker where necessary for
20 > > sensible behaviour was considered acceptable, and with good reason.
21 >
22 > As in "we have a square wheels, let's make routes for them"...
24 More like "getting the linker right is important enough to us that
25 we'll pester people to make their wheels at least octagonal rather than
26 the current square". Unfortunately, as-needed is moving back to square.
28 > Anyway is the book a standard? Is it available as pdf so you can
29 > point me the exact paragraph?
31 The book is an explanation of why the standard is the way it is. You
32 can find it at your local library.
34 Whilst we're on the subject... You'll note that as-needed overrides
35 explicit instructions from the programmer. When you say "link A to B",
36 you aren't say "link A to B unless you feel like not doing the link".
37 Unfortunately, the ricers shoving as-needed upon everyone aren't smart
38 enough to fix libtool, which is the real problem here, so they go for
39 the thing they think they understand instead, without thinking the
40 implications through -- as-needed, like fast-math, is for programs
41 explicitly designed for it, not for universal use.
43 --
44 Ciaran McCreesh


File name MIME type
signature.asc application/pgp-signature