Search path of libs confusing

Robert Lipe robertl@dgii.com
Mon Nov 3 13:37: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.

$ ./xgcc -B./ -print-search-dirs
install: /usr/local/lib/gcc-lib/i586-pc-sco3.2v5.0.4/egcs-2.90.15/
programs: ./i586-pc-sco3.2v5.0.4/egcs-2.90.15/:./:/usr/local/lib/gcc-lib/i586-p
c-sco3.2v5.0.4/egcs-2.90.15/:/usr/local/lib/gcc-lib/i586-pc-sco3.2v5.0.4/:/usr/
lib/gcc/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/usr/lib/gcc/i586-pc-sco3.2v5.0.4/:/
usr/local/i586-pc-sco3.2v5.0.4/bin/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/usr/loca
l/i586-pc-sco3.2v5.0.4/bin/:/usr/ccs/bin/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/us
r/ccs/bin/
libraries: ./i586-pc-sco3.2v5.0.4/egcs-2.90.15/:./:/usr/local/lib/gcc-lib/i586-
pc-sco3.2v5.0.4/egcs-2.90.15/:/usr/lib/gcc/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/
usr/local/i586-pc-sco3.2v5.0.4/lib/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/usr/loca
l/i586-pc-sco3.2v5.0.4/lib/:/usr/ccs/bin/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/us
r/ccs/bin/:/usr/ccs/lib/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/usr/ccs/lib/:/usr/l
ocal/lib/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/usr/local/lib/:/lib/i586-pc-sco3.2
v5.0.4/egcs-2.90.15/:/lib/:/usr/lib/i586-pc-sco3.2v5.0.4/egcs-2.90.15/:/usr/lib
/


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?


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.

RJL



More information about the Gcc mailing list