Auto-rpath revisited...
Ian Lance Taylor
ian@cygnus.com
Sat Feb 21 12:35:00 GMT 1998
Date: Sat, 21 Feb 1998 12:13:34 -0800
From: Lee Iverson <leei@ai.sri.com>
But I don't want you to shut up, I want to get this right. What do
you want to be saved from? As I said before, any rpath entries the
user specifies are retained and have highest priority. I don't really
think in terms of *changing* the user-supplied rpath, just *augmenting*
it if and only if necessary.
The case I want to be saved from is specifically having an unexpected
directory in my rpath. That's because many dynamic linkers will
search every directory in rpath. If one of those directories happens
to be mounted over NFS, my program has an unexpected dependency on an
NFS server. There is nothing wrong with an expected dependency on an
NFS server, but an unexpected one can be quite bad when the server
goes down.
We've already assumed that I'm explicitly using -rpath, so I
presumably understand how the dynamic linker works. We're no longer
talking about the naive user baffled by shared library searching,
which I agree is a real problem which I think will be solved by your
proposed patch.
As a non-naive user, I may have made special arrangements to provide a
copy of libstdc++.so in a special location on local disk. When gcc
automatically adds a directory to rpath, my careful plans will be
silently foiled, causing an unpleasant future surprise.
Basically, you are proposing a silent change to an existing option,
with potential bad consequences, and that makes me uncomfortable.
Ian
More information about the Gcc
mailing list