svn commit: r284898 - in head: . share/mk
Dimitry Andric
dim at FreeBSD.org
Sun Jun 28 10:10:29 UTC 2015
On 28 Jun 2015, at 11:55, Baptiste Daroussin <bapt at FreeBSD.org> wrote:
>
> On Sun, Jun 28, 2015 at 11:48:48AM +0200, Dimitry Andric wrote:
>> On 28 Jun 2015, at 10:57, Baptiste Daroussin <bapt at FreeBSD.org> wrote:
>>>
>>> On Sun, Jun 28, 2015 at 01:44:21AM -0700, NGie Cooper wrote:
>>>> On Sun, Jun 28, 2015 at 12:49 AM, Baptiste Daroussin <bapt at freebsd.org> wrote:
>>>> ...
>>>>> Not at all I have this on a both where I haven't yet r284898 iirc it is like
>>>>> this since the beginning I do not remember seeing those ld scripts with absolute
>>>>> path.
>>>>
>>>> $ cat /usr/lib/libc.so
>>>> /* $FreeBSD$ */
>>>> GROUP ( /lib/libc.so.7 /usr/lib/libc_nonshared.a /usr/lib/libssp_nonshared.a )
>>>> $ what -q /boot/GENERIC.r283337+9c333ed/kernel
>>>> FreeBSD 11.0-CURRENT #4 r283337+9c333ed(isilon-atf): Tue May 26
>>>> 21:49:09 PDT 2015
>>>
>>> Yes you are right, I was looking at the wrong place.
>>
>> What is actually the perceived problem with having paths in those linker
>> scripts? If you use --sysroot, the libraries are searched relative to
>> that sysroot, right?
>>
>> (And yes, I know our gcc's sysroot implementation is broken. So please
>> fix that instead. :-)
>>
> WHat is the point in having absolute path in the linker script?
Of course, the point is to know exactly *which* libraries you are going
to link in. E.g., those with the specified paths, and not any other.
> having an
> absolute patch (or even no path at all) will make the compiler looking in its
> search path (and respecting sysroot).
I think you meant "relative path" here? I'm not sure if relative names
like ../../foo/libbar.so will work with path searches, though.
> The only case where a path is needed seems
> to be when the lib you want to link to is not in the search path. Am I missing
> something?
You're not missing anything. Some people just seem to prefer exact
paths, while others trust in search mechanisms (and the risk that the
wrong library is accidentally picked up).
FWIW, I don't mind removing the absolute paths in these scripts, but I
was simply interested in what problems people encountered due to them.
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20150628/da8d4cd9/attachment.bin>
More information about the svn-src-head
mailing list