Subject: Re: Problem linting libkafs - make guru needed
To: Bill Studenmund <email@example.com>
From: Todd Whitesel <firstname.lastname@example.org>
Date: 10/06/1998 22:46:48
> > 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.
> Actually, I only added the defs above when linking libraries. So I'm not
> sure how many of the problems you mention apply (libraries don't need
> crt0.o, do they?).
Whoops, my original concern was a total red herring. My description of
-nostdlib is valid for GNU ld, but not for the ld we actually use, about
whose lineage I am unworthy to hypothesize. Sorry for the confusion.
In our current ld, all -nostdlib does is prevent -L/usr/lib from implicitly
appearing in the linker's environment. Searching of -lgcc -lc or crt0.o is
not affected by it. (grep for std_search_path underneath gnu/usr.bin/ld)
Given this, I'd say your use of -nostdlib is not gross at all, but totally
appropriate -- it's about the only thing our -nostdlib would be good for.
However if we ever migrate to GNU ld, this might become a migration issue.
> Linking a program works fine w/ DESTDIR. It's only a library which needs
> another library which has problems.
Okay. This certainly helps explain why libgroff hated my guts for switching
back and forth between gcc/egcs a few times in one week.
toddpw @ best.com