This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should gcc add RPATH for libstdc++.so?
- To: gcc at gcc dot gnu dot org
- Subject: Re: Should gcc add RPATH for libstdc++.so?
- From: Gordon Sadler <gbsadler1 at lcisp dot com>
- Date: Tue, 20 Mar 2001 23:26:30 -0600
- References: <20010321001140.A14061@mediaone.net>
On Wed, Mar 21, 2001 at 12:11:40AM -0500, Craig Rodrigues wrote:
> Hi,
>
> I read the following entry in GNATS:
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2242&database=gcc
>
> The submitter suggested that gcc should add the flag
> -Wl,-rpath,[path to libstdc++.so] when it compiles something.
>
> Does this idea have merit?
> I think it is not a bad idea. For example, when I compile
> CodeSourcery snapshots of gcc from their source rpm,
> gcc fails to add /usr/local/lib to the RPATH of executables
> it creates, requiring me to set the LD_LIBRARY_PATH environment variable.
>
Anyone that follows Debian can give you the gist of why this is a not so
good thing... Users can change LD_LIBRARY_PATH in their $HOME/.bashrc or
equivalent. Admins can modify /etc/ld.so.conf. If you hardcode rpath
into a lib or binary... You cannot effectively move it after you install
it. Nightmares for packagers.
There already exist a few specific examples of rpath in the gcc
build-system. For the most part, they deal with internal compiler
issues. But libstdc++.so is not specific to the compiler, you can
change, move, alter libstdc++.so and use the same gcc.
Suggest not to add rpath to libstdc++.
Gordon Sadler