Subject: Re: Problem linting libkafs - make guru needed
To: Bill Studenmund <skippy@macro.stanford.edu>
From: Todd Whitesel <toddpw@best.com>
List: current-users
Date: 10/06/1998 15:45:34
> 1) Our build tools don't deal well w/ libraries which link against other
> libraries when you're in a DESTDIR environment. The fix is easy (add
> -L$DESTDIR/usr/lib -nostdlib if you're DESTDIR'ing), but seems gross to
> folks. Well, everyone I've shown it to dislikes it. :-) Right now, we have
> no libraries with this problem.

Yes, it's gross, because -nostdlib is a sledgehammer. It suppresses the
presence of crt0.o and friends in the link line (or at least it should,
according to GNU docs) and also the frequently-needed -lgcc -lc options
which are implicitly part of a "normal" link.

It'd be better to have an option in the linker that replaced the default
library directory /usr/lib with something else. Then we could use a CC
or LD macro in the makefiles and set it to something like

LD	= $(CC) -YULS,$(DESTDIR)/usr/lib

(I forget which, but there was a SysV system on which the above option set
three library search paths -- before user libraries, after user libraries,
and startup files -- and there is a multiple-platform compiler suite from
Green Hills that supports these options as well.)

Todd Whitesel
toddpw @ best.com