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.

Reply via email to