This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Support LD_AS_NEEDED
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, binutils at sources dot redhat dot com
- Date: Thu, 7 May 2009 17:19:06 +0200
- Subject: Re: PATCH: Support LD_AS_NEEDED
- References: <20090506212719.GA28875@lucon.org> <4A02F7BD.4040703@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, May 07, 2009 at 04:01:17PM +0100, Nick Clifton wrote:
> >I got a request to support LD_AS_NEEDED. OK for trunk?
>
> Nope.
>
> No patch that adds the passing of command line switches via environment
> variables is ever going to be accepted.
>
> It confuses users when the linker does not behave in way that looking at
> the linker command line would suggest. Plus it makes debugging even
> more difficult since it can be very difficult to determine exactly what
> the environment variables contain at the time that the linker is executed.
Yeah, 100% agreed.
Plus users that want --as-needed to be by default the first
option can always do
mkdir -p ~/bin
echo '#!/bin/sh' > ~/bin/ld
echo 'exec /usr/bin/ld --as-needed "$@"' >> ~/bin/ld
chmod 755 ~/bin/ld
PATH=~/bin:$PATH make
Jakub