libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATCH: Fix libtool to support Linux/mips


From: H . J . Lu
Subject: Re: PATCH: Fix libtool to support Linux/mips
Date: Thu, 7 Feb 2002 00:22:36 -0800
User-agent: Mutt/1.2.5i

On Thu, Feb 07, 2002 at 05:34:55AM -0200, Alexandre Oliva wrote:
> On Feb  7, 2002, "H . J . Lu" <address@hidden> wrote:
> 
> > # gcc -fPIC -c foo.c
> > # ar rcs libfoo.a foo.o
> > # gcc -fPIC -c bar.c
> > # gcc -shared -o libar.so bar.o -lfoo -L.
> 
> > I don't want ANY dependency of libfoo.a in libbar.so.
> 
> With the commands above, you don't get any dependency of libtool.a in
> libbar.so.  I don't understand what you're complaining about.  This
> doesn't even use libtool.
> 
> > That is I can give libbar.so to someone. He/she can use it without
> > libfoo.a. With the current binutils in CVS, I got
> 
> > /bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes 
> > -Wmissing-prototypes -g -O2  -o libbfd.la -rpath /export/tools/lib -release 
> > 2.11.93  archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo 
> > format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo 
> > targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo 
> > stab-syms.lo merge.lo dwarf2.lo archive64.lo `cat ofiles` 
> > -L../libiberty/pic -liberty 
> 
> > Did you see
> 
> > dependency_libs=' 
> > -L/export/build/gnu/binutils-import/build-i686-linux/libiberty/pic -liberty'
> 
> Ah, ok, so it's the -liberty in libbfd.la that troubles you?
> 
> If all you want is to be able to give libbfd.so to someone else, do
> so.  You don't have to take libbfd.la along with it; just get rid of
> it.  And make sure you don't give libbfd.a away either, because it's

What is libbfd.la good for? It has

dependency_libs=' 
-L/export/build/gnu/binutils-import/build-i686-linux/libiberty/pic -liberty'

> useless without the libiberty.a that you don't want to include in your
> package.
> 
> > That is completely bogus for Linux.
> 
> Nope, it's absolutely correct.
> 
> Try to link with libbfd.la with -static, then drop -liberty from the
> command line you get and you'll see why.
> 
> > Please fix it.
> 
> You still haven't shown that there's anything to be fixed.

See about. I simply don't like the idea of dependency on static
libraries under Linux. When I need libiberty.a, I will add -liberty.
I don't need libtool to add things which don't belong there. libtool
should just behave like ld/ar and nothing more.


H.J.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]