[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: Bob Friesenhahn
Subject: Re: Including static libraries in shared libraries with libtool.
Date: Sun, 26 Sep 2004 18:58:01 -0500 (CDT)

On Sun, 26 Sep 2004, Howard Chu wrote:

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?

Do we know that all platforms have a "compiler" that takes "source files" as input and produces "object files" as output? Do we know that all platforms treat these "object files" as intermediate files that then must be magically combined into a usable "executable" (or "shared library") file?

We are at least assured (by the C standard) that there are "translation" units which may include other files. We know how code in these translation units is initialized at run-time. Everything else is left open to imagination. Luckily, little in the computing world happens by chance and the tendency is toward order rather than chaos.

On any platform where these conditions are false, libtool has no function anyway. Foregoing this approach due to supposed portability concerns is totally baseless.

You are taking things to an extreme. Your proposed simple command will surely fail if the system has an arbitrary maximum command line length (most do) and will fail if the objects use some other extension than ".o". Many assumptions are made which may not exist in practice.

Bob Friesenhahn

reply via email to

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