This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [RFC] sysroot and dynamic libraries


On Thu, 7 Aug 2008, Daniel Jacobowitz wrote:

> On Thu, Aug 07, 2008 at 01:10:57PM +0930, Alan Modra wrote:
> > I have my sysrooted toolchain sitting in /home/alan/toolchain/, so
> > there is /home/alan/toolchain/lib/libc.so.6 and
> > /home/alan/toolchain/lib/ld.so.1.  Someone then passes -L/usr/lib
> > -L/lib to gcc, resulting in /lib/libc.so.6 being found rather than my
> > sysrooted version.  The DT_NEEDED search finds
> > /home/alan/toolchain/lib/ld.so.1 to meet the libc dependency, but
> > ld.so and libc.so are then from different versions of glibc.  Boom.
> > 
> > Anyway, killing the -L search is probably using too big a hammer.
> > I'll try something different.
> 
> FWIW, we've got a local gcc patch that warns when people do this with
> -I options (based on a configure-time option).  Same sort of thing
> ought to work for this.

We have patches for both GCC and the linker.  They hardcode lists of 
problem directories (/lib, /usr/lib, /usr/X11R6/lib for the linker); I'm 
not sure that would be appropriate for FSF binutils.

-- 
Joseph S. Myers
joseph@codesourcery.com


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