Search path of libs confusing
Jeffrey A Law
law@cygnus.com
Tue Nov 4 15:39:00 GMT 1997
> 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
More information about the Gcc
mailing list