Subject: Re: static vs. dynamic runtime linking, again (was: PAM and su -K)
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Jachym Holecek <freza@liberouter.org>
List: tech-userlevel
Date: 01/30/2005 23:17:05
> > There are good reasons for NOT setting the RPATH based on -L.  Consider:
> > 	cc -o foo -L ../foolib -lfoosup
> 
> "based on" != "equal to".
> 
> It might be reasonable to, for example, default -R to -L minus all
> non-absolute components. Or perhaps default -R to all -L elements that
> actually got used to find a shared library, or something - "based on"
> covers a lot of possibilities.

Hmm, for the first option consider:

	${LD} -L${FOO} -R${INSTALLDIR}/lib ...

where FOO is calculated from .CURDIR/.OBJDIR/whatever. This gives "absolute
path that you probably don't want on the search-list". Most meanings of
"based on" that I can think of right now would end up rather confusing.

> I'd still like a warning by default, though, when running the resulting
> binary immediately would fail to find one or more libraries.

A warning would be nice and useful (supposing it can be turned off), IMO.

	Regards,
		-- Jachym Holecek