This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rewrite lib/g77.exp
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Geoff Keating <geoffk at geoffk dot org>
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, gcc-patches at gcc dot gnu dot org
- Date: 17 Nov 2001 03:14:06 -0200
- Subject: Re: rewrite lib/g77.exp
- Organization: GCC Team, Red Hat
- References: <200110290051.TAA28367@caip.rutgers.edu><jm3d42qic9.fsf@geoffk.org>
On Oct 29, 2001, Geoff Keating <geoffk@geoffk.org> wrote:
> "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
>> > From: Geoff Keating <geoffk@geoffk.org>
>> > I'm sure the problem is with the second of these lines:
>> >
>> > if [file exists "${gccpath}/libf2c/.libs/libg2c.so"] {
>> > append flags "-Wl,--rpath-link,${rootme} "
>> > append ld_library_path ":${gccpath}/libf2c/.libs"
>> > }
>> >
>> > which is GNU ld specific; it aims to ensure that the just-built
>> > libgcc_s.so is linked against. Can you propose a substitute for it
>> > that works with both Solaris ld and GNU ld?
>>
>>
>> What's wrong with:
>>
>> > append ld_library_path ":${rootme}"
>>
>> like in g++.exp?
> It's not enough. (You can see that g77.exp does in fact have that line.)
> It's possible this is a linker bug.
I recall a number of dynamic loaders will disregard LD_LIBRARY_PATH
when looking for dependencies of shared libraries. This is one of the
reasons why I recommend using libtool for libgcc: then libtool will
know how to arrange for libg2c.la to find libgcc_s.so in the build
tree, and then, after they're installed, the installed copy of
libg2c.so will find libgcc_s.so in the install tree.
#include usual caveats about encoding search paths into shared
libraries, and why they're good for many and bad for many others
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me