rewrite lib/g77.exp

Alexandre Oliva
Tue Nov 13 15:03:00 GMT 2001

On Oct 29, 2001, Geoff Keating <> wrote:

> "Kaveh R. Ghazi" <> writes:
>> > From: Geoff Keating <>

>> > I'm sure the problem is with the second of these lines:
>> > 
>> > 	  if [file exists "${gccpath}/libf2c/.libs/"] {
>> > 	      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
>> > 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 to find in the build
tree, and then, after they're installed, the installed copy of will find 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
Red Hat GCC Developer                  aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist    *Please* write to mailing lists, not to me

More information about the Gcc-patches mailing list