On Thu, 13 May 2021, FOURNIER Yvan wrote:
Hi Karl,
Regarding the possible addition of a libtool option to ignore .la
files, I would need to take a deeper look into how libtool works (I
have only scratched the surface and experimented with it as a "black
box" so far, but If I do get around to it, I will definitely send a
patch or post it here).
It would be useful to know why .la files are "incorrect".
The most common concern is that libtool links using full dependencies
(evaluated using information from the .la files) rather than relying
on a target's implicit dependency support. This means that libraries
may be "over-linked" and thus record undesirable (e.g. to the
distribution maintainers) dependency information.
If recorded dependency information in a .la file becomes incorrect
because an implicit dependency was re-built, or an alternate
implementation library was substituted, then that creates a problem.
Libtool is first and foremost a portability tool. It also helps
support static linkage.
Solving the library depencency issue properly (while not relying on
non-portable implicit dependency support or 3rd party software) might
require more controls/knobs for libtool as well as an update to the
.la file format so it is clear which dependencies are direct, and
which are simply dependencies of the direct dependencies.
If the ability to static link is not important, or if only
using/supporting GNU Linux with GCC then libtool is not needed.
GCC itself knows how to create shared libraries on popular targets.
Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt