On Thu, Jan 24, 2019 at 01:09:19PM -0500, Paul Smith wrote:
> On Mon, 2018-12-31 at 17:28 -0600, Peng Yu wrote:
> > I see that LD is defined in as shown in --print-data-base. But no
> > rules use it. Then what is the purpose to define it? Should either
> > adding a rule use LD, or deleting its definition? Thanks.
> 
> There is no rule to use it because none of the built-in rules need it:
> linking rules use the compiler front-end to do linking correctly.
> 
> It exists in the default database because... it's always been there...
> 
> I don't see any reason to remove it, and there are undoubtedly some
> makefiles out there relying on it existing and being defined by default
> which would be broken if we did remove it.

I actually use LD in a makefile.  I use the value of LD to choose
between the gcc CFLAGS options "-fuse-ld=bfd", "-fuse-ld=gold" or
"-fuse-ld=lld"

In my youth, I actually wrote my own linking rules to invoke the
linker directly, but, I don't have time for that anymore. ;-)

-Mike Gran

_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to