public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ciaran McCreesh <ciaran.mccreesh@googlemail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
Date: Sat, 31 May 2008 01:30:16 +0100	[thread overview]
Message-ID: <20080531013016.4aceedbb@snowcone> (raw)
In-Reply-To: <4840990B.9040909@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1985 bytes --]

On Sat, 31 May 2008 02:17:15 +0200
Luca Barbato <lu_zero@gentoo.org> wrote:
> Ciaran McCreesh wrote:
> > Linking with as-needed is the stage in which the elimination occurs,
> > and as-needed is the cause of the elimination. So yes, it is
> > related.
> 
> The linker just does bookkeeping, if there aren't symbols used, the 
> library won't be in the list.

Which is where the design flaw is -- as-needed incorrectly assumes that
the only type of dependency between shared objects is a name
dependency. This isn't true with C++ static initialisers.

> >> Still, PE and ELF are older than the first C++ spec so, IFF your
> >> reading of this chapter is correct, C++ is broken by design.
> > 
> > Not at all. Read "The Design and Evolution of C++", and you shall
> > see that requiring changes to the linker where necessary for
> > sensible behaviour was considered acceptable, and with good reason.
> 
> As in "we have a square wheels, let's make routes for them"...

More like "getting the linker right is important enough to us that
we'll pester people to make their wheels at least octagonal rather than
the current square". Unfortunately, as-needed is moving back to square.

> Anyway is the book a standard? Is it available as pdf so you can
> point me the exact paragraph?

The book is an explanation of why the standard is the way it is. You
can find it at your local library.

Whilst we're on the subject... You'll note that as-needed overrides
explicit instructions from the programmer. When you say "link A to B",
you aren't say "link A to B unless you feel like not doing the link".
Unfortunately, the ricers shoving as-needed upon everyone aren't smart
enough to fix libtool, which is the real problem here, so they go for
the thing they think they understand instead, without thinking the
implications through -- as-needed, like fast-math, is for programs
explicitly designed for it, not for universal use.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-05-31  0:30 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28 23:13 [gentoo-dev] RFC: Should preserve-libs be enabled by default? Marius Mauch
2008-05-29  4:48 ` [gentoo-dev] " Ryan Hill
2008-05-29  5:14 ` [gentoo-dev] " Donnie Berkholz
2008-05-29  6:54 ` Rémi Cardona
2008-05-29  7:55   ` Fabian Groffen
2008-05-29 14:40   ` Arfrever Frehtes Taifersar Arahesis
2008-05-29  8:28 ` Mike Auty
2008-05-29 17:30   ` Marius Mauch
2008-05-29  9:02 ` [gentoo-dev] " Diego 'Flameeyes' Pettenò
2008-05-30  5:02   ` Marius Mauch
2008-05-30  6:55     ` Peter Volkov
2008-05-30  7:16       ` Mike Auty
2008-05-30 12:09         ` Santiago M. Mola
2008-05-30 12:22           ` Diego 'Flameeyes' Pettenò
2008-05-30 15:57             ` David Leverton
2008-05-30 16:29               ` Diego 'Flameeyes' Pettenò
2008-05-30 16:35                 ` Ciaran McCreesh
2008-05-30 16:43                 ` David Leverton
2008-05-30 19:13                   ` Luca Barbato
2008-05-30 19:20                     ` Ciaran McCreesh
2008-05-30 21:31                       ` Mart Raudsepp
2008-05-30 21:37                         ` Ciaran McCreesh
2008-05-30 21:47                           ` [gentoo-dev] RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?) Mart Raudsepp
2008-05-30 21:53                             ` Ciaran McCreesh
2008-05-30 22:07                               ` Donnie Berkholz
2008-05-30 22:14                                 ` Ciaran McCreesh
2008-05-30 23:13                                   ` Luca Barbato
2008-05-30 23:26                                     ` Ciaran McCreesh
2008-05-30 23:43                                       ` Brian Harring
2008-05-30 23:50                                         ` Ciaran McCreesh
2008-05-30 23:54                                       ` Luca Barbato
2008-05-31  0:02                                         ` Ciaran McCreesh
2008-05-31  0:17                                           ` Luca Barbato
2008-05-31  0:30                                             ` Ciaran McCreesh [this message]
2008-05-31  1:03                                               ` Luca Barbato
2008-05-31  1:17                                                 ` Ciaran McCreesh
2008-05-31  1:43                                                   ` Brian Harring
2008-05-31  1:50                                                     ` Ciaran McCreesh
2008-05-31  2:01                                                       ` Brian Harring
2008-05-31  2:08                                                         ` Ciaran McCreesh
2008-05-31  2:08                                                       ` Nirbheek Chauhan
2008-05-31  2:14                                                         ` Ciaran McCreesh
2008-05-31  2:23                                                           ` Nirbheek Chauhan
2008-05-31  2:33                                                             ` Ciaran McCreesh
2008-05-31  2:58                                                               ` Nirbheek Chauhan
2008-05-31  3:03                                                                 ` Ciaran McCreesh
2008-05-31  3:15                                                                   ` Nirbheek Chauhan
2008-05-31  3:28                                                                     ` Brian Harring
2008-05-31  6:25                                                                       ` Peter Volkov
2008-05-31 10:35                                                                         ` Luca Barbato
2008-05-31 11:26                                                                           ` Alec Warner
2008-05-31 11:41                                                                             ` Alexis Ballier
2008-05-31 11:45                                                                             ` Marius Mauch
2008-05-31 10:14                                                               ` Luca Barbato
2008-05-31 10:27                                                                 ` David Leverton
2008-05-31  2:50                                                           ` Ravi Pinjala
2008-05-31  3:03                                                             ` Ciaran McCreesh
2008-05-31 13:19                                                               ` [gentoo-dev] " Duncan
2008-05-31 19:24                                                     ` [gentoo-dev] Re: RFC: --as-needed to default LDFLAGS Ulrich Mueller
2008-05-31 19:32                                                       ` Mike Auty
2008-05-31 23:57                                                         ` Duncan
2008-06-01 16:44                                                       ` Rémi Cardona
2008-05-31  6:09                                                   ` [gentoo-dev] RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?) Michal Kurgan
2008-05-31  1:39                                   ` Josh Saddler
2008-05-30 23:08                               ` Luca Barbato
2008-05-30 23:16                                 ` Ciaran McCreesh
2008-05-30 23:18                                   ` Luca Barbato
2008-05-31  6:22                                   ` Roy Marples
2008-05-31  0:29                             ` Marius Mauch
2008-05-30 12:31           ` [gentoo-dev] Re: RFC: Should preserve-libs be enabled by default? Rémi Cardona
2008-05-30 12:39             ` Diego 'Flameeyes' Pettenò
2008-05-30 10:55       ` Ciaran McCreesh
2008-05-30 19:29         ` Luca Barbato
2008-05-30 19:48           ` Ciaran McCreesh
2008-05-30 11:37     ` Diego 'Flameeyes' Pettenò
2008-05-29 14:39 ` [gentoo-dev] " Arfrever Frehtes Taifersar Arahesis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080531013016.4aceedbb@snowcone \
    --to=ciaran.mccreesh@googlemail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox