From owner-cvs-all@FreeBSD.ORG Thu Sep 4 11:59:05 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A470B16A4C1; Thu, 4 Sep 2003 11:59:05 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADAC043FA3; Thu, 4 Sep 2003 11:58:53 -0700 (PDT) (envelope-from ru@sunbay.com) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h84Iwj86016709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Sep 2003 21:58:48 +0300 (EEST) (envelope-from ru@sunbay.com) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h84Iwd4o016700; Thu, 4 Sep 2003 21:58:39 +0300 (EEST) (envelope-from ru) Date: Thu, 4 Sep 2003 21:58:39 +0300 From: Ruslan Ermilov To: Gordon Tetlow Message-ID: <20030904185839.GB4481@sunbay.com> References: <200309040429.h844TBhD058678@repoman.freebsd.org> <20030904083617.GA56261@dragon.nuxi.com> <20030904092755.GD45051@sunbay.com> <20030904140129.GA61909@dragon.nuxi.com> <20030904155659.GC97732@sunbay.com> <20030904162656.GA396@dragon.nuxi.com> <20030904174100.GY695@roark.gnf.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lMM8JwqTlfDpEaS6" Content-Disposition: inline In-Reply-To: <20030904174100.GY695@roark.gnf.org> User-Agent: Mutt/1.5.4i cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Peter Wemm cc: David O'Brien Subject: Re: cvs commit: src/share/mk bsd.lib.mk X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2003 18:59:05 -0000 --lMM8JwqTlfDpEaS6 Content-Type: multipart/mixed; boundary="NMuMz9nt05w80d4+" Content-Disposition: inline --NMuMz9nt05w80d4+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 04, 2003 at 10:41:00AM -0700, Gordon Tetlow wrote: > On Thu, Sep 04, 2003 at 09:26:56AM -0700, David O'Brien wrote: > > On Thu, Sep 04, 2003 at 06:56:59PM +0300, Ruslan Ermilov wrote: > > > Sure. The fix is to make ``cc --print-search-dirs'' output include > > > the /lib directory too. =20 > >=20 > > That is trival. > >=20 > > > I'm currently testing some patches with bsd.lib.mk,v 1.152. > >=20 > > We should all agree on where the symlink for things like libc.so.X live. > > I'm 99% sure Peter will argue /usr/lib, and I personally don't care -- I > > just want one of them. Before commiting yet something else to > > bsd.lib.mk, what direction are you going in? >=20 > It is much more appealing to me to put everything that is needed for a bu= ild > into /usr/lib. /lib should only have enough to get us up and running, not > enough to get us compiling, that's what /usr/lib is for. I have a patch > that will do what we want, I'll see if I can dig it up. >=20 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. We can implement either (I already have all the necessary patches), so the question is which one do we really want. 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. BTW, NetBSD uses absolute paths in symlinks from /usr/lib to /lib: > ls -l /usr/lib/libz.so* lrwxr-xr-x 1 root wheel 16 Aug 30 14:58 /usr/lib/libz.so -> /lib/libz= =2Eso.0.3 lrwxr-xr-x 1 root wheel 16 Aug 30 14:58 /usr/lib/libz.so.0 -> /lib/li= bz.so.0.3 lrwxr-xr-x 1 root wheel 16 Aug 30 14:58 /usr/lib/libz.so.0.3 -> /lib/= libz.so.0.3 Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software Ltd, ru@FreeBSD.org FreeBSD committer --NMuMz9nt05w80d4+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Index: bsd.lib.mk =================================================================== RCS file: /home/ncvs/src/share/mk/bsd.lib.mk,v retrieving revision 1.153 diff -u -r1.153 bsd.lib.mk --- bsd.lib.mk 4 Sep 2003 04:29:11 -0000 1.153 +++ bsd.lib.mk 4 Sep 2003 18:45:27 -0000 @@ -208,8 +208,9 @@ ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \ ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR} .if defined(SHLIB_LINK) - ln -fs ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK} -.if (${LIBDIR} != ${SHLIBDIR}) +.if ${SHLIBDIR} == ${LIBDIR} + ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK} +.else ln -fs ${LIBDIR:C|/[^/]+|/..|g:S|^/||}${SHLIBDIR}/${SHLIB_NAME} \ ${DESTDIR}${LIBDIR}/${SHLIB_LINK} .endif --NMuMz9nt05w80d4+-- --lMM8JwqTlfDpEaS6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/V4tfUkv4P6juNwoRAmglAJ9ZB0nvcrUR2/u1ityFdKf71bh0WACZATkb zhMpQdicFDYMH2i0YuEyQ2Y= =kcbR -----END PGP SIGNATURE----- --lMM8JwqTlfDpEaS6--