This is the mail archive of the gcc-patches@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: rewrite lib/g77.exp


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


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