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