/lib/foo.so.X -> /usr/lib/foo.so

From: Ruslan Ermilov <ru_at_FreeBSD.org>
Date: Thu, 4 Sep 2003 23:27:15 +0300
On Thu, Sep 04, 2003 at 09:58:39PM +0300, Ruslan Ermilov wrote:
[...]
> The patch is not a problem (attached).  I've been looking at
> how our friends do this.  NetBSD has symlinks in /usr/lib to
> /lib, both to .so and .so.X, and their cc(1) and ld(1) don't
> look things in /lib.  Linux looks things up in both /lib and
> /usr/lib, and does not have symlinks from /usr/lib to /lib.
> 
There is a sad typo above: Linux *does* have symlinks from
/usr/lib to /lib, so both use /usr/lib for linking.

> The only reason while I still think we should support both
> /lib and /usr/lib in cc(1) and ld(1) by default is to allow
> our users to have /usr symlinked somethere, otherwise relative
> symlinking from /usr/lib to ../../lib does not work, and we
> are back to that endless thread.
> 
Not that I'm completely happy with introducing yet another
variable in bsd.lib.mk, but the attached patch:

- Leaves only one set of .so symlinks in /usr/lib.

  Benefits: all other systems that use both /lib and /usr/lib
  (that I've been able to test) have .so links in /usr/lib
  only, and use them for linking; GCC in ports will like this
  better.

- Uses absolute paths in .so symlinks.

  Benefit: works for people who have their /usr symlinked
  somewhere.

- Works without any more modifications to GCC.  ld(1)
  hacks can go away too.

Please review.


Cheers,
-- 
Ruslan Ermilov		Sysadmin and DBA,
ru_at_sunbay.com		Sunbay Software Ltd,
ru_at_FreeBSD.org		FreeBSD committer

Received on Thu Sep 04 2003 - 11:27:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:21 UTC