FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 05-30-2008, 11:43 PM
Brian Harring
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

On Sat, May 31, 2008 at 12:26:44AM +0100, Ciaran McCreesh wrote:
> On Sat, 31 May 2008 01:13:58 +0200
> Luca Barbato <lu_zero@gentoo.org> wrote:
> > I know exactly which standard -ffast-math violates (IEEE/ISO floating
> > point spec) and how (the man page is quite complete about this),
> > --as-needed doesn't have any warning about this, there isn't any
> > standard that it violates since it's the default behavior at least
> > for 2 platform (one from those who wrote most of the ELF spec...).
> > Point the spec, and the paragraph violated.
>
> ISO/IEC 14882:1998 section 3.7.1 paragraph 2.

Might want to confirm it's in 14882:2003, since the '98 was withdrawn...
~harring
 
Old 05-30-2008, 11:50 PM
Ciaran McCreesh
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

On Fri, 30 May 2008 16:43:38 -0700
Brian Harring <ferringb@gmail.com> wrote:
> > ISO/IEC 14882:1998 section 3.7.1 paragraph 2.
>
> Might want to confirm it's in 14882:2003, since the '98 was
> withdrawn... ~harring

It's in all the way up to the current 0x draft. It even has the same
section and paragraph number.

--
Ciaran McCreesh
 
Old 05-30-2008, 11:54 PM
Luca Barbato
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

Ciaran McCreesh wrote:

On Sat, 31 May 2008 01:13:58 +0200
Luca Barbato <lu_zero@gentoo.org> wrote:
I know exactly which standard -ffast-math violates (IEEE/ISO floating
point spec) and how (the man page is quite complete about this),
--as-needed doesn't have any warning about this, there isn't any
standard that it violates since it's the default behavior at least

for 2 platform (one from those who wrote most of the ELF spec...).
Point the spec, and the paragraph violated.


ISO/IEC 14882:1998 section 3.7.1 paragraph 2.



"If an object of static storage duration has initialization or a
destructor with side effects, it shall not be eliminated even if

it appears to be unused, except that a class object or its copy
may be eliminated as specified in 12.8."

Unchanged in the 2003 revision.

Is that related to linking? I don't think so. 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.


lu

--

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero

--
gentoo-dev@lists.gentoo.org mailing list
 
Old 05-31-2008, 12:02 AM
Ciaran McCreesh
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

On Sat, 31 May 2008 01:54:45 +0200
Luca Barbato <lu_zero@gentoo.org> wrote:
> > ISO/IEC 14882:1998 section 3.7.1 paragraph 2.
>
> "If an object of static storage duration has initialization or a
> destructor with side effects, it shall not be eliminated even if
> it appears to be unused, except that a class object or its copy
> may be eliminated as specified in 12.8."
>
> Unchanged in the 2003 revision.
>
> Is that related to linking? I don't think so.

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.

> 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.
--
Ciaran McCreesh
 
Old 05-31-2008, 12:17 AM
Luca Barbato
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

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.



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"...

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


lu - changing the world so non euclidean aberrations fit isn't sensible

--

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero

--
gentoo-dev@lists.gentoo.org mailing list
 
Old 05-31-2008, 12:29 AM
Marius Mauch
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

On Sat, 31 May 2008 00:47:44 +0300
Mart Raudsepp <leio@gentoo.org> wrote:

> Portage developers - is there anything we should do to get --as-needed
> to make.conf.example and other places, beyond fixing the known bugs on
> the appropriate bug tracker?

make.conf.example is no big deal, that's just documentation, though
personally I'd prefer to remove the toolchain (CHOST, *FLAGS) stuff from
there so we don't have to maintain all the arch-specific diffs.

If you want to really enable it by default you'll have to persuade the
profile maintainers to add it into the appropriate make.defaults.

Marius
--
gentoo-dev@lists.gentoo.org mailing list
 
Old 05-31-2008, 12:30 AM
Ciaran McCreesh
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

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
 
Old 05-31-2008, 01:03 AM
Luca Barbato
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

Ciaran McCreesh wrote:

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.


I don't see why should be different than abusing .init in any other
language that let you do (ok, C, C++, asm mostly).



Unfortunately, the ricers shoving as-needed upon everyone aren't smart


Asking people to not do stuff that is unportable (Solaris and PE based
systems) seems sensible and not ricing.



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.


Differently -ffast-math is setting up a slightly different behavior than
the usual standard, --as-needed enforce what is the default standard in
determined architectures, thus the exception and the universality are
quite reverted.


We already started to think how to fix libtool, or at least make it less
annoying, removing .la files when they are not necessary.


Similarly we started proposing upstream to use pkg-config if they aren't
already.


lu

--

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero

--
gentoo-dev@lists.gentoo.org mailing list
 
Old 05-31-2008, 01:17 AM
Ciaran McCreesh
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

On Sat, 31 May 2008 03:03:42 +0200
Luca Barbato <lu_zero@gentoo.org> wrote:
> Ciaran McCreesh wrote:
> > 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.
>
> I don't see why should be different than abusing .init in any other
> language that let you do (ok, C, C++, asm mostly).

In C++ it's not abuse. It's using the language as specified and
designed.

> > Unfortunately, the ricers shoving as-needed upon everyone aren't
> > smart
>
> Asking people to not do stuff that is unportable (Solaris and PE
> based systems) seems sensible and not ricing.

Not where "unportable" means "doesn't work on systems that fail to
correctly implement widely used international standards" it doesn't.

You might as well say "you shouldn't use lchown() because BSD 2 doesn't
support it".

> > 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.
>
> Differently -ffast-math is setting up a slightly different behavior
> than the usual standard, --as-needed enforce what is the default
> standard in determined architectures, thus the exception and the
> universality are quite reverted.

Both are standard-violating options that are useful for applications
designed to work with them explicitly.

> We already started to think how to fix libtool, or at least make it
> less annoying, removing .la files when they are not necessary.

Again, that's silly ricing. Saving a few kBytes is irrelevant. Instead,
you should be focusing your efforts upon something that will really
make a difference, like getting something based upon this into upstream:

http://patches.ubuntu.com/by-release/extracted/debian/libt/libtool/1.9+20051221-1/link_all_deplibs.dpatch

--
Ciaran McCreesh
 
Old 05-31-2008, 01:39 AM
Josh Saddler
 
Default RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)

Ciaran McCreesh wrote:

On Fri, 30 May 2008 15:07:43 -0700
Donnie Berkholz <dberkholz@gentoo.org> wrote:
I see that a number of packages in the tree explicitly filter
-ffast-math.


That's mostly from the bad old days when users were encouraged to use
silly CFLAGS...


1. _When_ was this?
2. _Who_ was encouraging this?

. . . because it sure as hell hasn't ever been in the official
documentation.


Last year I wrote the optimization guide[1] in part to stem the flood of
bad advice on the unofficial gentoo-wiki, and by uninformed users on the
forums.


There hasn't been any official documentation telling users to do foolish
things with their CFLAGS or LDFLAGS.


[1] http://www.gentoo.org/doc/en/gcc-optimization.xml
 

Thread Tools




All times are GMT. The time now is 07:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org