Hi, On Sun, 21 Nov 2004, Thiago Macieira wrote: > My solution consists in: > 1) adding the --enable-new-dtags flag to the linker, if supported. This > makes GNU ld emit RUNPATH directives as well as RPATH. The consequence is > twofold: > a) RPATH is ignored > b) RUNPATH is overrideable by LD_LIBRARY_PATH at run-time > > 2) making libtool's stub script use LD_LIBRARY_PATH as well as relinking. This should do no harm. It changes a bit the way how you can call the lt-* binary. After calling the script once it was self-contained (i.e. contained all relevant RPATHs), so it was possible to call the lt-* binary directly. Now you really have to go through the script for setting LD_LIBRARY_PATH. > These two changes make the correct library be loaded. > > 3) make the --as-needed flag usage default to yes only if > --enable-new-dtags is present as well I don't like this. The reason is, that some ld's (well, yes, SuSE's binutils) have this active by default. On those it works without the flag. I would expect that somewhen the default for using the new dtags will be switched globally. So the dependency of as-needed on new-dtags should not be strict. Ciao, Michael.