On Fri, 2 Jun 2000, Stephan Kulow wrote:

> Hi!
> 
> This happens with the multi-language-branch:
> g++ -shared -nostdlib /usr/lib/crti.o
> /usr/lib/gcc-lib/i386-linux/egcs-2.91.66/crtbeginS.o 
> .libs/dcopserver.o  -L/usr/lib
> -L/usr/lib/gcc-lib/i386-linux/egcs-2.91.66 -L/usr/i386-linux/lib
> -L/usr/X11R6/lib -L/home/coolo/prod/qt/lib -L/home/coolo/prod/KDE/lib
> 
> Note, that quite some libraries were droped and a -L/usr/lib is added
> in front of the link line. I don't know if dropping the libraries is

I only wanted to add, that $predeps are added before $libs if
$linkmode==lib. This is also a problem, because e.g for me $predeps
contains "-L/usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.3
-L/usr/local/lib". This also gets added in _front_ of the user specified
-L* by libtool and may have undesired side effect. The problem is, that in
the output of the compiler command which is parsed to get the libstdc++,
these -L* are in front of the conftest.o.
Now g++ itself of course would add any user specified -L* in front of
them, and so should libtool too.

Furthermore this wrong ordering is saved into the .la files and every
other lib I want to link against them picks that up.

> intended, but adding /usr/lib causes quite some problems (the path
> itself is added by libjpeg.la if I understand the bash -xe right)

I think so too. It remained even there as I had patched libtool to move
all -[lL]* elements of $predeps to $postdeps, and modified all installed
.la files accordingly. After that at least _only_ /usr/lib was added in
front, not the compiler-path and /usr/local/lib.


Ciao,
Michael.

Reply via email to