Re: [EXTERNAL] Re: Q: library dependencies

John Calcote <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <CA+LTicsg45yBCHaj_pn7vTXKW7M1kAH=hz_TXBaP7Bpoi6T1OA@mail.gmail.com>
Hi Bob,



On Fri, Sep 25, 2020 at 10:45 AM Bob Friesenhahn <
[email protected]> wrote:

> On Fri, 25 Sep 2020, Oleg Smolsky wrote:
>
> > Well, AFAIK any well-formed .a file (an archive) is a static lib. And
> these
> > can be passed to the linker. Are you saying that libtool extracts the
> > individual .o files instead passing -lfoo (for libfoo.a)?
>
> Exactly!  It might as well be a tar file except that the 'ar' archiver
> knows how to add/update/remove files from it and that is not possible
> with a tar file.  The ability to do incremental updates of the archive
> file is important as objects are built/rebuilt.  The 'make' program
> itself already understands archive files.
>

I did not know this about libtool and convenience libraries. Do you have
any historical notion of why this was done? I ask because this sort of
behaviour total defeats the linker's ability to discard unused objects,
does it not?

Thanks,
John
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.