This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question concerning shared libraries in non-standard locations


> > 2. Remember to include the appropriate -W,l-R option or whatever in
> >    [each] and every compilation.
> 
> I don't think it's a good idea to compile in rpaths to non-standard
> (user-specific) directories by default.  This can lead to trapdoor
> rpaths and generally makes the binaries less portable (not more).

The security threat you refer to here is a bit obscure to me, but I don't
really think it's entirely germane.  Consider these uses of GCC:

  (a) compiling things for local use
  (b) compiling things to export

When one is compiling for export, one expects to have to take special
measures to insure portability, but is that really the common case?
My suspicion is that (a) is the common case (it certainly is for me),
and given that, the behavior of the default configuration with a
non-standard --prefix---producing executables that won't run without
special measures---seems rather bizarre.  Remember that in case (a), we 
expect the shared libraries to be present (in their non-standard locations) 
at execution time.

I guess that I'm simply suggesting that it might be nice if the sort
of modification suggested by Albert Chin's response to my question
could be installed automatically under control of a configuration
option (e.g.), or as a result of the configuration script's detecting
a non-standard prefix.  (Well, actually, I think his patch has to
modified for recent versions; doesn't 4.x compile them into the source
files?).

Paul Hilfinger




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]