This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: collect2/ld doesn't search all paths dumped by gcc -print-search-dirs
- From: Ian Lance Taylor <iant at google dot com>
- To: "John Z. Bohach" <jzb2 at aexorsyst dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 23 Feb 2009 12:51:07 -0800
- Subject: Re: collect2/ld doesn't search all paths dumped by gcc -print-search-dirs
- References: <200902211728.59486.jzb2@aexorsyst.com>
"John Z. Bohach" <jzb2@aexorsyst.com> writes:
> I'm trying to build a tiny test program using an alternate toolchain
> built purely from source (LFS ch. 5 method), but collect2 says that ld
> can't find a lib. that _does_ exist under /usr/lib, but /usr/lib is not
> even attempted as part of the search, even though /usr/lib _is_ part of
> the library search path dumped by "gcc -print-search-dirs".
> Bizarre...what am I misunderstanding?
That certainly seems peculiar and may indicate a bug. Try running gcc
with the -v option to set the list of -L options which gcc passes to
collect2. Those options should all be passed on to the linker. You can
also run gcc with the option -Wl,-debug to see debugging information
from collect2.
Ian