libtool-patches
[Top][All Lists]
Advanced

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

doc: clarification of convenience archi and --preserve-dup-deps


From: tom fogal
Subject: doc: clarification of convenience archi and --preserve-dup-deps
Date: Wed, 24 Aug 2005 21:07:46 -0400

Attached is a patch to make the concept of a convenience archive and
the --preserve-dup-deps option clearer, after much discussion with
Ralf.

This is against HEAD.

Please CC me on replies, I am not subscribed.

-tom

Index: ChangeLog
===================================================================
RCS file: /cvsroot/libtool/libtool/ChangeLog,v
retrieving revision 1.2028
diff -u -r1.2028 ChangeLog
--- ChangeLog   23 Aug 2005 16:04:24 -0000      1.2028
+++ ChangeLog   24 Aug 2005 02:53:23 -0000
@@ -1,3 +1,14 @@
+<<<<<<< ChangeLog
+2005-08-23  Tom Fogal  <address@hidden>
+            Ralf Wildenhues  <address@hidden>
+
+       * doc/libtool.texi (Linking Static Libraries): Convenience archives
+       are similar to GNU ld's --whole-archive option.
+       (Invoking libtool): Option --preserve-dup-deps must come before CC.
+
+       * TODO: CC, --preserve-dup-deps ordering should not matter.
+
+=======
 2005-08-23  Stepan Kasal  <address@hidden>,
            Ralf Wildenhues  <address@hidden>
 
@@ -146,6 +157,7 @@
 
        * m4/ltdl.m4 (LTDL_INIT): Fix mismatched parens.
 
+>>>>>>> 1.2028
 2005-08-13  Ralf Wildenhues  <address@hidden>
 
        * tests/inherited_flags.at: Store intermediate libtool output
Index: TODO
===================================================================
RCS file: /cvsroot/libtool/libtool/TODO,v
retrieving revision 1.69
diff -u -r1.69 TODO
--- TODO        18 Aug 2005 09:51:57 -0000      1.69
+++ TODO        24 Aug 2005 02:53:23 -0000
@@ -76,6 +76,11 @@
 * Look at better -no-undefined support, maybe along the idea of
   [support #103719] for CC.
 
+* Remove the limitation that --preserve-dup-deps appear before CC in the
+  libtool command line.
+  The documentation currently mentions this limitation under "@chapter Invoking
+  @command{libtool}", and will therefore need to be updated as well.
+
 
 1.2. libtldl
 ------------
Index: doc/libtool.texi
===================================================================
RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.196
diff -u -r1.196 libtool.texi
--- doc/libtool.texi    22 Aug 2005 11:12:26 -0000      1.196
+++ doc/libtool.texi    24 Aug 2005 02:53:26 -0000
@@ -1050,6 +1050,34 @@
 objects, and link against that with the other libraries, instead of
 listing all the object files every time.
 
+When another libtool-created archive is linked to a convenience library, all
+objects from the convenience library are linked into the newly created
+archive.  This is different from a traditional static library, which only
+includes the objects required to resolve the current set of undefined
+references.  Due to this behavior, we can use a convenience archive or
+archives to create any other type of library (static, shared, or another
+convenience archive).  This allows us to create a single convenience archive
+that is the union of multiple convenience archives.
+
address@hidden
+host$ @kbd{libtool --mode=link $CC $CFLAGS $LDFLAGS -o lib123.la \
+               subdirA/lib1.la subdirB/lib2.la subdirC/lib3.la}
address@hidden example
+
+This provides a logical and portable way of linking a project that includes
+several different modules, stored in different subdirectories.  Each
+subdirectory can create a libtool convenience archive, and then one archive
+can be created that has all the symbols from each of the different modules,
+by a command similar to the above.  Finally the application can be linked
+against the new all-encompassing convenience archive.
+
address@hidden convenience archives are similar in concept to the
address@hidden @command{ld} option, @option{--whole-archive}.  The subtle
+difference is that libtool will bring together all of the objects at
+the time the convience archive is linked, whereas @command{ld}
address@hidden would bring together the objects when the
+output object is linked.
+
 If you just want to link this convenience library into programs, then
 you could just ignore libtool entirely, and use the old @command{ar} and
 @command{ranlib} commands (or the corresponding @sc{gnu} Automake
@@ -1191,7 +1219,8 @@
 situations, where -la -lb -la is required, and the second -la may not be
 stripped or the link will fail.  In cases where these duplications are
 required, this option will preserve them, only stripping the libraries
-that libtool knows it can safely.
+that libtool knows it can safely.  Please be aware that in current versions
+of libtool, this option must appear before @option{$CC} to be effective.
 
 @item --quiet
 @itemx --silent

reply via email to

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