[RFC] sysroot and dynamic libraries

Daniel Jacobowitz drow@false.org
Thu Aug 7 11:23:00 GMT 2008


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.

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list