cvs commit: src/share/mk

Ruslan Ermilov ru at
Fri Sep 5 00:43:49 PDT 2003

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/
> 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/ -> /lib/
> /usr/lib/ -> /lib/
> /lib/
> Note that the third one is solely for anti-foot-shooting and to make sure
> that any stale /usr/lib/'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 /lib
ln -fs /lib/  /usr/lib/
ln -fs /lib/  /usr/lib/

install -C -o root -g wheel -m 444   libwrap.a /usr/lib
install -s -o root -g wheel -m 444 /usr/lib
ln -fs /usr/lib/

Ruslan Ermilov		Sysadmin and DBA,
ru at		Sunbay Software Ltd,
ru at		FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the cvs-src mailing list