Re: RFC: -Wl,--as-needed by default

2017-11-27 Thread Adam Jackson
On Mon, 2017-11-27 at 09:46 +0100, Jakub Jelinek wrote: > There are several problems with forceful --as-needed: > 1) forcing it everywhere is a workaround to broken tools that add -l* > options just in case (like auto*, libtool, pkg-config) pkg-config isn't broken here. Individual pc files might

Re: RFC: -Wl,--as-needed by default

2017-11-27 Thread Jakub Jelinek
On Mon, Nov 27, 2017 at 09:21:16AM +0100, Dridi Boukelmoune wrote: > On Mon, Nov 13, 2017 at 11:01 PM, Tomasz Kłoczko > wrote: > > On 13 November 2017 at 10:52, Björn 'besser82' Esser > > wrote: > > > However AFAIK only reason of any issues

Re: RFC: -Wl,--as-needed by default

2017-11-27 Thread Dridi Boukelmoune
On Mon, Nov 13, 2017 at 11:01 PM, Tomasz Kłoczko wrote: > On 13 November 2017 at 10:52, Björn 'besser82' Esser > wrote: > However AFAIK only reason of any issues related to use -Wl,--as-needed > is using WRONG list -l parameters (lack of

Re: RFC: -Wl,--as-needed by default (and glibc ldconfig file trigger)

2017-11-21 Thread Igor Gnatenko
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Tue, 2017-11-21 at 18:09 +, Tomasz Kłoczko wrote: > On 21 November 2017 at 16:36, Daniel P. Berrange wrote: > [..] > > > > > > Counting numbers of affected packages by guessing is very bad idea. > > > > > > > > > > Call

Re: RFC: -Wl,--as-needed by default (and glibc ldconfig file trigger)

2017-11-21 Thread Tomasz Kłoczko
On 21 November 2017 at 16:36, Daniel P. Berrange wrote: [..] >> > > > Counting numbers of affected packages by guessing is very bad idea. >> > > >> > > Call it educated guess if you want. >> > >> > You know, there is a way to get more reliable data: do scratch builds of >> >

Re: RFC: -Wl,--as-needed by default (and glibc ldconfig file trigger)

2017-11-21 Thread Daniel P. Berrange
On Tue, Nov 21, 2017 at 05:22:32PM +0100, Stephan Bergmann wrote: > On 11/21/2017 04:12 PM, David Tardon wrote: > > On Tue, Nov 21, 2017 at 01:54:13PM +, Tomasz Kłoczko wrote: > > > On 21 November 2017 at 10:43, Igor Gnatenko > > > wrote: > > > > -BEGIN

Re: RFC: -Wl,--as-needed by default (and glibc ldconfig file trigger)

2017-11-21 Thread Stephan Bergmann
On 11/21/2017 04:12 PM, David Tardon wrote: On Tue, Nov 21, 2017 at 01:54:13PM +, Tomasz Kłoczko wrote: On 21 November 2017 at 10:43, Igor Gnatenko wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Tue, 2017-11-21 at 10:26 +, Tomasz Kłoczko

Re: RFC: -Wl,--as-needed by default (and glibc ldconfig file trigger)

2017-11-21 Thread David Tardon
Hello, On Tue, Nov 21, 2017 at 01:54:13PM +, Tomasz Kłoczko wrote: > On 21 November 2017 at 10:43, Igor Gnatenko > wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA256 > > > > On Tue, 2017-11-21 at 10:26 +, Tomasz Kłoczko wrote: > >> So is it

Re: RFC: -Wl,--as-needed by default (and glibc ldconfig file trigger)

2017-11-21 Thread Tomasz Kłoczko
On 21 November 2017 at 10:43, Igor Gnatenko wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On Tue, 2017-11-21 at 10:26 +, Tomasz Kłoczko wrote: >> So is it any final decision about start use by default --as-needed in >> linker options? > > Can

Re: RFC: -Wl,--as-needed by default (and glibc ldconfig file trigger)

2017-11-21 Thread Igor Gnatenko
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Tue, 2017-11-21 at 10:26 +, Tomasz Kłoczko wrote: > So is it any final decision about start use by default --as-needed in > linker options? Can you link Change Proposal you (or someone else) submitted? I have not heard anything about that. >

Re: RFC: -Wl,--as-needed by default (and glibc ldconfig file trigger)

2017-11-21 Thread Tomasz Kłoczko
So is it any final decision about start use by default --as-needed in linker options? Looking again on whole discussion across this thread and on https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/3 I don't see any arguments against start use --as-needed by default so looks like

Re: RFC: -Wl,--as-needed by default

2017-11-14 Thread Igor Gnatenko
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Tue, 2017-11-14 at 07:14 -0500, Neal Gompa wrote: > On Tue, Nov 14, 2017 at 7:08 AM, Florian Weimer wrote: > > On 11/14/2017 12:50 PM, Neal Gompa wrote: > > > > > > Then something isn't working correctly, because then

Re: RFC: -Wl,--as-needed by default

2017-11-14 Thread Neal Gompa
On Tue, Nov 14, 2017 at 7:08 AM, Florian Weimer wrote: > On 11/14/2017 12:50 PM, Neal Gompa wrote: >> >> Then something isn't working correctly, because then libcomps builds >> should be failing in Fedora. It doesn't. It fails in *every other >> Linux distribution* that I've

Re: RFC: -Wl,--as-needed by default

2017-11-14 Thread Florian Weimer
On 11/14/2017 12:50 PM, Neal Gompa wrote: Then something isn't working correctly, because then libcomps builds should be failing in Fedora. It doesn't. It fails in *every other Linux distribution* that I've built it for (Mageia, openSUSE, OpenMandriva, Solus, and others...) unless I patch it to

Re: RFC: -Wl,--as-needed by default

2017-11-14 Thread Neal Gompa
On Tue, Nov 14, 2017 at 6:45 AM, Panu Matilainen wrote: > On 11/14/2017 01:32 PM, Neal Gompa wrote: >> >> On Tue, Nov 14, 2017 at 2:07 AM, Florian Weimer >> wrote: >>> >>> On 11/14/2017 03:54 AM, Philip Kovacs wrote: One concern is that

Re: RFC: -Wl,--as-needed by default

2017-11-14 Thread Panu Matilainen
On 11/14/2017 01:32 PM, Neal Gompa wrote: On Tue, Nov 14, 2017 at 2:07 AM, Florian Weimer wrote: On 11/14/2017 03:54 AM, Philip Kovacs wrote: One concern is that -Wl,--as-needed requires greater accuracy with the ordering of objects and libraries as you link. Also, if a

Re: RFC: -Wl,--as-needed by default

2017-11-14 Thread Neal Gompa
On Tue, Nov 14, 2017 at 2:07 AM, Florian Weimer wrote: > On 11/14/2017 03:54 AM, Philip Kovacs wrote: >> >> One concern is that -Wl,--as-needed requires greater accuracy with the >> ordering of objects and >> libraries as you link. Also, if a package uses a library

Re: RFC: -Wl,--as-needed by default

2017-11-13 Thread Florian Weimer
On 11/14/2017 03:54 AM, Philip Kovacs wrote: One concern is that -Wl,--as-needed requires greater accuracy with the ordering of objects and libraries as you link.   Also, if a package uses a library indirectly, i.e. A uses C via B: A -> B -> C,--as-needed will peel away C and break A unless A

Re: RFC: -Wl,--as-needed by default

2017-11-13 Thread Philip Kovacs
One concern is that -Wl,--as-needed requires greater accuracy with the ordering of objects and  libraries as you link.   Also, if a package uses a library indirectly, i.e. A uses C via B: A -> B -> C,--as-needed will peel away C and break A unless A explicitly mentions its need for C.  Of

Re: RFC: -Wl,--as-needed by default

2017-11-13 Thread Tomasz Kłoczko
On 13 November 2017 at 22:01, Tomasz Kłoczko wrote: [..] > In other words -Wl,--as-needed should be used everywhere WITHOUT exceptions. > Easiest way apply this globally in Fedora is add --as-needed in > /usr/lib/rpm/redhat/redhat-hardened-ld spec file by apply patch: >

Re: RFC: -Wl,--as-needed by default

2017-11-13 Thread Tomasz Kłoczko
On 13 November 2017 at 10:52, Björn 'besser82' Esser wrote: [..] > that specific flag should be in LDFLAGS, but there are reasons, we do > NOT have it in there, because it will likely break any binaries built > from or containing FORTRAN sources. They will simply

Re: RFC: -Wl,--as-needed by default

2017-11-13 Thread Neal Gompa
On Mon, Nov 13, 2017 at 7:21 AM, Michael Catanzaro wrote: > On Mon, Nov 13, 2017 at 5:06 AM, Daniel P. Berrange > wrote: >> >> What % of our distro involves fortran though ? Could this be as simple as >> enabling it by default, but having an easy

Re: RFC: -Wl,--as-needed by default

2017-11-13 Thread Michael Catanzaro
On Mon, Nov 13, 2017 at 5:06 AM, Daniel P. Berrange wrote: What % of our distro involves fortran though ? Could this be as simple as enabling it by default, but having an easy way via an RPM macro to opt-out of it in the handleful of packages that matter wrt fortran. If

Re: RFC: -Wl,--as-needed by default

2017-11-13 Thread Daniel P. Berrange
On Mon, Nov 13, 2017 at 11:52:14AM +0100, Björn 'besser82' Esser wrote: > Am Montag, den 13.11.2017, 11:02 +0100 schrieb Igor Gnatenko: > > Hello, > > > > I'm interested why we still don't have this flag in our CFLAGS? It > > seems that > > other distributions like openSUSE enable it by default

Re: RFC: -Wl,--as-needed by default

2017-11-13 Thread Björn 'besser82' Esser
Am Montag, den 13.11.2017, 11:02 +0100 schrieb Igor Gnatenko: > Hello, > > I'm interested why we still don't have this flag in our CFLAGS? It > seems that > other distributions like openSUSE enable it by default and it helps > in many > cases to avoid over-linking (for example, see thread about

RFC: -Wl,--as-needed by default

2017-11-13 Thread Igor Gnatenko
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello, I'm interested why we still don't have this flag in our CFLAGS? It seems that other distributions like openSUSE enable it by default and it helps in many cases to avoid over-linking (for example, see thread about poppler). Are there any