cvs commit: src/share/mk bsd.lib.mk

Gordon Tetlow gordont at gnf.org
Fri Sep 5 09:12:16 PDT 2003


On Fri, Sep 05, 2003 at 10:42:03AM +0300, Ruslan Ermilov wrote:
> On Thu, Sep 04, 2003 at 09:22:44PM -0700, Peter Wemm wrote:
> [...]
> > I'm really not hung up on whether we expose /lib to the toolchain, but I do
> > feel that we're asking for trouble if 'cc' and 'ld' do not agree about the
> > default search path.  Currently, 'ld' searches /lib before /usr/lib.  But
> > when called by cc, cc adds -L/usr/lib which means the search path becomes
> > /usr/lib, /lib, /usr/lib.  So if /usr/lib/libc.a exists and /usr/lib/libc.so
> > does not, then it will link statically.  The same goes for old build scripts
> > etc.  If anything adds -L/usr/lib to the beginning of the search path, then
> > we are sunk.
> > 
> > My preference is to Keep It Simple and have things arranged like this:
> > 
> > /usr/lib/libc.a
> > /usr/lib/libc.so -> /lib/libc.so.5
> > /usr/lib/libc.so.5 -> /lib/libc.so.5
> > /lib/libc.so.5
> > 
> > Note that the third one is solely for anti-foot-shooting and to make sure
> > that any stale /usr/lib/libc.so.5's get removed.
> > 
> Yeah, I've updated my patch similarly due to this same consideration,
> now it looks like this:
> 
> install -C -o root -g wheel -m 444   libc.a /usr/lib
> install -s -o root -g wheel -m 444   -fschg  libc.so.5 /lib
> ln -fs /lib/libc.so.5  /usr/lib/libc.so.5

This symlink needs to be preceded by a chflags noschg since existing
the /usr/lib/libc.so.5 is immutable. FYI.

> ln -fs /lib/libc.so.5  /usr/lib/libc.so
> 
> install -C -o root -g wheel -m 444   libwrap.a /usr/lib
> install -s -o root -g wheel -m 444     libwrap.so.3 /usr/lib
> ln -fs libwrap.so.3 /usr/lib/libwrap.so

This looks good though! Thanks for doing the legwork.

-gordon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20030905/0550bb1b/attachment.bin


More information about the cvs-src mailing list