Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
Fabian Groffen wrote: Perhaps we could add a new function to the flag-o-matic that does the CHOST check, and appends the flag, so the check code wouldn't have to be duplicated in ebuilds? It should be rather trivial. ok, chost check would be cheap. how about, usage: append-ldflags $(no-as-needed) that would work fine for me, and all possible future cases I can think of +# @FUNCTION: no-as-needed +# @RETURN: Flag to disable asneeded behavior for use with append-ldflags. +no-as-needed() { + case $($(tc-getLD) -v 21 /dev/null) in + *GNU*) # GNU ld + echo -Wl,--no-as-needed ;; + esac +} It's committed. To avoid the already caused trouble for you (prefix), these should be converted: (It's a ugly grep -r from gentoo-x86. I will handle this also in a QA bug, opening one later today.) app-admin/apache-tools/apache-tools-2.2.11.ebuild: # Instead of filtering --as-needed (bug #128505), append --no-as-needed app-admin/apache-tools/apache-tools-2.2.11.ebuild: append-ldflags -Wl,--no-as-needed app-admin/apache-tools/apache-tools-2.2.13.ebuild: # Instead of filtering --as-needed (bug #128505), append --no-as-needed app-admin/apache-tools/apache-tools-2.2.13.ebuild: append-ldflags -Wl,--no-as-needed app-admin/apache-tools/apache-tools-2.2.12.ebuild: # Instead of filtering --as-needed (bug #128505), append --no-as-needed app-admin/apache-tools/apache-tools-2.2.12.ebuild: append-ldflags -Wl,--no-as-needed app-editors/mlview/mlview-0.8-r1.ebuild:append-ldflags -Wl,--no-as-needed dev-games/ogre/files/ogre-1.4.9-as-needed.patch:+ ,-Xlinker --no-as-needed -lstdc++) dev-lang/gdl/gdl-0.9_rc2.ebuild:use imagemagick append-ldflags -Wl,--no-as-needed dev-libs/yaz++/yaz++-1.1.0.ebuild: append-ldflags -Wl,--no-as-needed # FIXME. dev-libs/dvmysql/dvmysql-1.0.2.ebuild: append-ldflags -Wl,--no-as-needed dev-libs/dvutil/dvutil-0.15.5.ebuild: append-ldflags -Wl,--no-as-needed dev-libs/dvutil/dvutil-1.0.5.ebuild:append-ldflags -Wl,--no-as-needed dev-lisp/sbcl/sbcl-1.0.19.ebuild: append-ldflags -Wl,--no-as-needed # see Bug #132992 dev-lisp/sbcl/sbcl-1.0.31.ebuild: append-ldflags -Wl,--no-as-needed # see Bug #132992 dev-lisp/sbcl/sbcl-1.0.27-r10.ebuild: append-ldflags -Wl,--no-as-needed # see Bug #132992 dev-lisp/sbcl/sbcl-1.0.26-r10.ebuild: append-ldflags -Wl,--no-as-needed # see Bug #132992 dev-lisp/sbcl/sbcl-1.0.28.ebuild: append-ldflags -Wl,--no-as-needed # see Bug #132992 eclass/apache-2.eclass: # Instead of filtering --as-needed (bug #128505), append --no-as-needed eclass/apache-2.eclass: append-ldflags -Wl,--no-as-needed media-libs/SoQt/SoQt-1.4.1.ebuild: append-ldflags -Wl,--no-as-needed media-sound/pulseaudio/pulseaudio-0.9.15-r2.ebuild: append-ldflags -Wl,--no-as-needed media-sound/pulseaudio/pulseaudio-0.9.18-r50.ebuild:append-ldflags -Wl,--no-as-needed media-sound/pulseaudio/pulseaudio-0.9.19.ebuild:append-ldflags -Wl,--no-as-needed media-sound/pulseaudio/pulseaudio-0.9.19-r50.ebuild:append-ldflags -Wl,--no-as-needed media-sound/pulseaudio/pulseaudio-0.9.18.ebuild:append-ldflags -Wl,--no-as-needed net-firewall/ebtables/ebtables-2.0.9.1.ebuild: append-ldflags -Wl,--no-as-needed net-firewall/ebtables/ebtables-2.0.8.2-r2.ebuild: append-ldflags -Wl,--no-as-needed net-libs/rb_libtorrent/rb_libtorrent-0.13-r1.ebuild:append-ldflags -Wl,--no-as-needed net-mail/email/email-3.0.5.ebuild: append-ldflags -Wl,--no-as-needed sci-libs/mkl/mkl-10.0.2.018-r2.ebuild: Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread sci-libs/mkl/mkl-10.0.2.018-r2.ebuild: Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread sci-libs/mkl/mkl-10.0.2.018-r2.ebuild: Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core -lmkl_lapack ${4} -lpthread sci-libs/mkl/mkl-10.0.5.025.ebuild: Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread sci-libs/mkl/mkl-10.0.5.025.ebuild: Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread sci-libs/mkl/mkl-10.0.5.025.ebuild: Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core -lmkl_lapack ${4} -lpthread sys-devel/libtool/libtool-2.2.6a.ebuild:append-ldflags -Wl,--no-as-needed sys-libs/gwenhywfar/gwenhywfar-3.7.2.ebuild:append-ldflags -Wl,--no-as-needed sys-libs/gwenhywfar/gwenhywfar-3.8.0.ebuild:append-ldflags -Wl,--no-as-needed x11-wm/matchbox/matchbox-0.7.1.ebuild: append-ldflags -Wl,--no-as-needed
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
On 04-10-2009 13:13:30 +0300, Samuli Suominen wrote: +# @FUNCTION: no-as-needed +# @RETURN: Flag to disable asneeded behavior for use with append-ldflags. +no-as-needed() { + case $($(tc-getLD) -v 21 /dev/null) in + *GNU*) # GNU ld + echo -Wl,--no-as-needed ;; + esac +} It's committed. To avoid the already caused trouble for you (prefix), these should be converted: thanks! -- Fabian Groffen Gentoo on a different level
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
Dne sobota 03 Říjen 2009 21:13:59 Samuli Suominen napsal(a): Since new binutils will support LD_AS_NEEDED=1 to force ld behave asneeded we could use this for the developer -target in profiles? Speak up if you think it's a terrible idea. Thanks, Samuli Could we enable it everywhere by default? Nice nice please, with cherry on the top :] Tomas signature.asc Description: This is a digitally signed message part.
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
Arfrever Frehtes Taifersar Arahesis wrote: 2009-10-03 21:13:59 Samuli Suominen napisał(a): Since new binutils will support LD_AS_NEEDED=1 to force ld behave asneeded we could use this for the developer -target in profiles? IMHO it should be set in the base profile so that everybody benefits from this. Have you seen the amount of open bugs in the asneeded tracker? The gentoo-x86 is not ready for it yet. That's why I'm suggesting we start from the developer target first. :-)
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
On Sat, 03 Oct 2009 22:13:59 +0300 Samuli Suominen ssuomi...@gentoo.org wrote: Since new binutils will support LD_AS_NEEDED=1 to force ld behave asneeded we could use this for the developer -target in profiles? Speak up if you think it's a terrible idea. Well, it does break correct code, so it's about on par with forcing -ffast-math or -fno-exceptions or -fvisibility-inlines-hidden on globally... -- Ciaran McCreesh signature.asc Description: PGP signature
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
Ciaran McCreesh wrote: On Sat, 03 Oct 2009 22:13:59 +0300 Samuli Suominen ssuomi...@gentoo.org wrote: Since new binutils will support LD_AS_NEEDED=1 to force ld behave asneeded we could use this for the developer -target in profiles? Speak up if you think it's a terrible idea. Well, it does break correct code, so it's about on par with forcing -ffast-math or -fno-exceptions or -fvisibility-inlines-hidden on globally... Be reasonable. We can add -Wl,--no-as-needed for those packages with valid code. And I'm certainly not suggesting adding it to base/, _only_ for the developer target.
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
On 03-10-2009 22:35:58 +0300, Samuli Suominen wrote: Ciaran McCreesh wrote: On Sat, 03 Oct 2009 22:13:59 +0300 Samuli Suominen ssuomi...@gentoo.org wrote: Since new binutils will support LD_AS_NEEDED=1 to force ld behave asneeded we could use this for the developer -target in profiles? Speak up if you think it's a terrible idea. Well, it does break correct code, so it's about on par with forcing -ffast-math or -fno-exceptions or -fvisibility-inlines-hidden on globally... Be reasonable. We can add -Wl,--no-as-needed for those packages with valid code. And I'm certainly not suggesting adding it to base/, _only_ for the developer target. Please recall that this is a GNU binutils flag. I prefer the environment flag over the command-line option, because it doesn't break other linkers, but if it implies many ebuilds getting -Wl,--no-as-needed append-ldflagged, then I'm not getting happy as that breaks my builds. -- Fabian Groffen Gentoo on a different level
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
Fabian Groffen wrote: On 03-10-2009 22:35:58 +0300, Samuli Suominen wrote: Ciaran McCreesh wrote: On Sat, 03 Oct 2009 22:13:59 +0300 Samuli Suominen ssuomi...@gentoo.org wrote: Since new binutils will support LD_AS_NEEDED=1 to force ld behave asneeded we could use this for the developer -target in profiles? Speak up if you think it's a terrible idea. Well, it does break correct code, so it's about on par with forcing -ffast-math or -fno-exceptions or -fvisibility-inlines-hidden on globally... Be reasonable. We can add -Wl,--no-as-needed for those packages with valid code. And I'm certainly not suggesting adding it to base/, _only_ for the developer target. Please recall that this is a GNU binutils flag. I prefer the environment flag over the command-line option, because it doesn't break other linkers, but if it implies many ebuilds getting -Wl,--no-as-needed append-ldflagged, then I'm not getting happy as that breaks my builds. The amount of pkgs in tree with valid code that fails with asneeded is close to zero. We can use this, if use userland_GNU; then append-ldflags -Wl,--no-as-needed fi logic so it won't cause you troubles. Or the obvious shorter version of it.
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
On 03-10-2009 23:27:41 +0300, Samuli Suominen wrote: The amount of pkgs in tree with valid code that fails with asneeded is close to zero. We can use this, if use userland_GNU; then append-ldflags -Wl,--no-as-needed fi logic so it won't cause you troubles. Or the obvious shorter version of it. Not really, because the userland is GNU, the compiler too, but the linker is not. We once played with a version of append-ldflags that tested the flag against the linker to see if it would work, but that's expensive as well as allowing real typos/bugs to go unnoticed. We currently do either a CHOST check, or call ld to see if it's GNU for all packages that hardcode -Wl,--{,no-}as-needed usage. -- Fabian Groffen Gentoo on a different level
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
Fabian Groffen wrote: On 03-10-2009 23:27:41 +0300, Samuli Suominen wrote: The amount of pkgs in tree with valid code that fails with asneeded is close to zero. We can use this, if use userland_GNU; then append-ldflags -Wl,--no-as-needed fi logic so it won't cause you troubles. Or the obvious shorter version of it. Not really, because the userland is GNU, the compiler too, but the linker is not. We once played with a version of append-ldflags that tested the flag against the linker to see if it would work, but that's expensive as well as allowing real typos/bugs to go unnoticed. We currently do either a CHOST check, or call ld to see if it's GNU for all packages that hardcode -Wl,--{,no-}as-needed usage. Ah. I wasn't aware of that. Perhaps we could add a new function to the flag-o-matic that does the CHOST check, and appends the flag, so the check code wouldn't have to be duplicated in ebuilds? It should be rather trivial.
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
Samuli Suominen wrote: Fabian Groffen wrote: On 03-10-2009 23:27:41 +0300, Samuli Suominen wrote: The amount of pkgs in tree with valid code that fails with asneeded is close to zero. We can use this, if use userland_GNU; then append-ldflags -Wl,--no-as-needed fi logic so it won't cause you troubles. Or the obvious shorter version of it. Not really, because the userland is GNU, the compiler too, but the linker is not. We once played with a version of append-ldflags that tested the flag against the linker to see if it would work, but that's expensive as well as allowing real typos/bugs to go unnoticed. We currently do either a CHOST check, or call ld to see if it's GNU for all packages that hardcode -Wl,--{,no-}as-needed usage. Ah. I wasn't aware of that. Perhaps we could add a new function to the flag-o-matic that does the CHOST check, and appends the flag, so the check code wouldn't have to be duplicated in ebuilds? It should be rather trivial. ok, chost check would be cheap. how about, no-as-needed() { case $($(tc-getLD) -v 21 /dev/null) in *GNU*) # GNU ld echo -Wl,--no-as-needed ;; esac } usage: append-ldflags $(no-as-needed)
Re: [gentoo-dev] RFC: LD_AS_NEEDED=1 in profiles/targets/developer/make.defaults?
On 04-10-2009 00:11:06 +0300, Samuli Suominen wrote: Perhaps we could add a new function to the flag-o-matic that does the CHOST check, and appends the flag, so the check code wouldn't have to be duplicated in ebuilds? It should be rather trivial. ok, chost check would be cheap. how about, no-as-needed() { case $($(tc-getLD) -v 21 /dev/null) in *GNU*) # GNU ld echo -Wl,--no-as-needed ;; esac } usage: append-ldflags $(no-as-needed) that would work fine for me, and all possible future cases I can think of -- Fabian Groffen Gentoo on a different level