This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Path to libstdc++
- From: "M. Lavasani" <lavasani at connect dot org dot uk>
- To: snowwolf at one2one-networks dot com (Allan Sandfeld Jensen)
- Cc: gcc at gcc dot gnu dot org, lavasani at connect dot org dot uk, manfred dot h at gmx dot net, snowwolf at one2one-networks dot com, rodrigc at attbi dot com
- Date: Tue, 26 Mar 2002 09:06:28 +0000 (GMT)
- Subject: Re: Path to libstdc++
>
> On Tuesday 26 March 2002 04:50, Craig Rodrigues wrote:
> > On Mon, Mar 25, 2002 at 10:36:33PM +0100, Allan Sandfeld Jensen wrote:
> > > I am getting seriously tired of writing:
> > > g++ helloworld.cpp -Wl,-R/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.1
> > > -o helloworld
> > >
> > > And the fact that I always have had to write that in linux doesnt make it
> > > any better.
> > >
> > > Does anyone have an idea, where this bug have crept in?
> >
> > This discussion has come up before. See:
> > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&
> >pr=2242 http://gcc.gnu.org/ml/gcc/2001-03/msg01069.html
>
> Hmm, what about at link time to add the path to the found a used libstdc++?
> Possibly putting this rpath last after search in LD_LIBRARY_PATH. Btw, Is
> this possible in elf? I know in hpux, you can add rpath with ld +b and search
> LD_LIBRARY_PATH with ld +s, +b arguments after +s are searched only if a
> library is not found in LD_LIBRARY_PATH.
That is true if you use older version of "gcc" to compile new version of
"gcc".
BUT, This won't work, if you use some platforms native compilers ( such
as HPUX native C compiler ) to compile gcc.
The sugesstion of setting the path in "LD_LIBRARY_PATH" is the best possible
solution.
Apart from that I really think the gcc developers should come up with better
configure and Makefile. First, they should scrap the idea of having version number
in header and library path ( or at least make it optional ). and second they should
build gcc in the same directory as the source, what is the problem of source and
object files being next to each other?, also thay can creat "lib" directory
and move all the generated libraries in that directory, and use relative link
instead of full path link.
__Mehdi