tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ${LD} incorrectly rewritten

On Mon, Feb 07, 2011 at 09:53:27AM -0700, Brook Milligan wrote:
 > > > Why have a path there at all? LD=ld should be safe, no?
 > > 
 > > It makes the behavior of the tools not predictable because they
 > > rely on the PATH.  I.e. a particular tool was built against a
 > > known-working ld binary but a user may suffer apparently random
 > > errors if his PATH points to a different (and
 > > broken/incompatible) ld.
 > Which is why I was interested in including the full path.  However, I
 > cannot find anywhere in pkgsrc that defines the path to ld.  There are
 > things like ${CCPATH} and ${CPPPATH}, but no ${LDPATH}.
 > Is ${LDPATH} something that should be added to pkgsrc or is ${LD},
 > i.e., without a path, ok for this substitution?

I would just use ${LD} without a path, for the following reasons:

(1) if the makefile is subsequently used from pkgsrc, it'll DTRT,
whereas an absolute path will bypass the wrappers and possibly fail

(2) someone who has a broken ld first on their path and tries to
compile stuff is not going to have much luck regardless of what we put

(3) someone who is trying to juggle two partly-working ld binaries on
their system, using each one only in the contexts where it works, is
probably going to have to hand-edit things anyway, and given (1)
trying to support this case is probably futile anyway.

David A. Holland

Home | Main Index | Thread Index | Old Index