This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problems with using libtool dependencies in opcodes
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: binutils at sources dot redhat dot com, aj at suse dot de
- Date: Mon, 8 Mar 2004 23:45:46 -0500
- Subject: Re: Problems with using libtool dependencies in opcodes
- References: <20031222182104.GA9036@nevyn.them.org> <or4qsy8z75.fsf@livre.redhat.lsd.ic.unicamp.br>
On Tue, Mar 09, 2004 at 12:41:02AM -0300, Alexandre Oliva wrote:
> On Dec 22, 2003, Daniel Jacobowitz <drow@mvista.com> wrote:
>
> > This problem:
> > http://sources.redhat.com/ml/binutils/2003-06/msg00025.html
> > is still present, and it's causing me a real headache.
>
> > I had hopes that the latest version of libtool would fix it, so I did a
> > hack-job to get all of binutils using the new version and tried again. What
> > we used to get was a command like this (roughly):
>
> > gcc -shared .libs/dis-buf.o .libs/disassemble.o .libs/dis-init.o \
> > .libs/i386-dis.o -L/opt/src/binutils/inst-tmp/obj/libiberty/pic \
> > -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib -lbfd \
> > -Wl,-soname -Wl,libopcodes-2.14.90.so -o .libs/libopcodes-2.14.90.so
>
>
> > Now we get:
>
> > gcc -shared .libs/dis-buf.o .libs/disassemble.o .libs/dis-init.o \
> > .libs/i386-dis.o -L/opt/src/binutils/inst-tmp/obj/libiberty/pic \
> > -L/opt/src/binutils/inst-tmp/inst/usr/local/lib -L/usr/local/lib -lbfd \
> > -Wl,-soname -Wl,libopcodes-2.14.90.so -o .libs/libopcodes-2.14.90.so
>
> > That fixes the immediate problem but opens up a whole new can of worms. By
> > adding -L$libdir to the path, my cross compiler configuration starts trying
> > to open /usr/lib/libc.so, which points it to /lib/libc.so.6.
>
> And why are you configuring the cross toolchain to be installed in
> /usr/local anyway? I think this is the root of the problem. You
> don't want libraries for the host to be installed in the same dir as
> libraries for the build machine, do you?
This is not a cross toolchain. It's a host-x-host toolchain. I don't
build my cross toolchains with --enable-shared, because they absolutely
must be relocatable so rpath is right out; I'm building something to
live on my target machine with its shared libraries installed in a
system directory.
It's the host != build that is causing the problem, since libtool
insists on putting host directories in link commands on the build
machine.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer