tech-pkg archive

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

Re: $LD contents changing



On 14. 4. 2012, at 15:57, OBATA Akio wrote:

> On Fri, 13 Apr 2012 20:36:37 +0900, Filip Hajny <filip%joyent.com@localhost> 
> wrote:
> 
>> Looking inside the wrapper, I see this:
>> 
>> cmd="/opt/local/bin/ld"
>> 
>> I should have noticed this earlier of course. So the follow-up question is 
>> clear. Is there a way to avoid PATH based lookup inside bsd.wrapper.mk? I'd 
>> like to define exactly what kind of linker I want to use at all times, since 
>> it's typically hard coded in gcc anyway.
>> 
>> Let me describe the situation:
>> 
>> * I have gcc compiled to use /usr/bin/ld, which is the Sun linker shipped 
>> with SmartOS.
>> * I have the wip/binutils package installed with GNU_PROGRAM_PREFIX empty 
>> (intentionally).
>> * When I build devel/libtool-base, it will pick up ${PREFIX}/bin/ld for the 
>> wrapper, and the resulting libtool package ends up with gnuisms all over of 
>> course.
>> 
>> I guess I'm looking for something like TOOLS_PLATFORM.ld, but I'm not 
>> finding anything similar. Do I need to look better, or does something as 
>> important as the libtool linker really depend on the ephemeral list of 
>> packages installed at build time?
> 
> Your original approach is correct.  Set your linker full path to LD, same as 
> C compiler path to CC.
> (default PATH based value LD?=ld is set in sys.mk from bootstrap-mk-files)

(I forgot to CC the list before)

Yes, I'm already setting my LD to an absolute path. That has no effect though, 
because bsd.wrapper.mk will currently *always* do a PATH based lookup of 'ld', 
ignoring whatever LD was set to before. That part IMO is wrong - one should be 
allowed to prefer a link regardless of which 'ld' comes up first in PATH.

-F


Home | Main Index | Thread Index | Old Index