This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Search path of libs confusing
- To: Robert Lipe <robertl at dgii dot com>
- Subject: Re: Search path of libs confusing
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 04 Nov 1997 16:31:20 -0700
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
> This is clearly inspired by my recent trip to hell caused by
> egcs picking up the wrong libstdc++.a, but looking at this
> closer makes me wonder if it's really optimal.
It's far from optimal....
> Rather than searching for libs in ./i586-pc-sco3.2v5.0.4/egcs-2.90.15
> should't it be looking in ../libraries? Is this fallout from the
> grand library shuffle from a few months ago?
It's not fallout from the library shuffle.
-B (AFAIK) wasn't ever meant to go fix all the -L arguments, just
add a new one so that libraries in the directory specified by
-B were found.
Making -B check ../libraries isn't going to help -- it would have
to do down in libio/libstdc++ to be useful.
One could argue that is the desired behavior -- I might even agree
since I've fought this more than once.
> Regardless of whether -mcoff or -melf is specified, the
> search dirs are the same. Yet the elf libraries are in
> libraries/*/*.a and the coff libraries are in libraries/coff/*/*.a.
> Is this really right? This might indicate a problem in the
> multilibbing of my target.
The multilib stuff happens later in gcc.c if I remember right --
part of the "find_file" routine instead of modifying the search
path directly.
jeff