[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Including static libraries in shared libraries with libtool.
From: |
Joe Orton |
Subject: |
Re: Including static libraries in shared libraries with libtool. |
Date: |
Mon, 27 Sep 2004 10:46:05 +0100 |
User-agent: |
Mutt/1.4.1i |
On Sun, Sep 26, 2004 at 07:12:33PM -0400, Sam Varshavchik wrote:
> Howard Chu writes:
>
> >One more time, shouting into the senseless void...
> >
> >If these so-called "convenience" libraries are meant to be linked in
> >whole, they should not be ar archives at all. You should just link them
> >directly into a relocatable object file:
> > ld -r -o <convenience.obj> *.o
>
> And do we know that all platforms have a program called "ld", then
> implements the "-r" option with the given semantics?
ld -r support is apparently universal on Unixes, but you're right it is
incorrect to just invoke ld directly like that, it will break on
multi-ABI platforms (where you need to use, e.g. ld -m <something> -r)
You can get libtool to DTRT by using:
libtool --mode=link $(CC) -o libfoo.lo foo.lo bar.lo
but I'm not 100% certain this is a supported libtool interface (link
target is .lo => use a partial link), I couldn't find it in the docs
anywhere.
It would be good to see a definitive statement on this from the libtool
maintainers.
joe
- Including static libraries in shared libraries with libtool., Sam Varshavchik, 2004/09/25
- Re: Including static libraries in shared libraries with libtool., Simon Richter, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Sam Varshavchik, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Bob Friesenhahn, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Howard Chu, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Sam Varshavchik, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Howard Chu, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Bob Friesenhahn, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Howard Chu, 2004/09/26
- Re: Including static libraries in shared libraries with libtool.,
Joe Orton <=
- Re: Including static libraries in shared libraries with libtool., Bob Friesenhahn, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Albert Chin, 2004/09/27
- Re: Including static libraries in shared libraries with libtool., Fredrick Meunier, 2004/09/26
- Re: Including static libraries in shared libraries with libtool., Bob Friesenhahn, 2004/09/26