]> Savannah Git Hosting - gnulib.git/commitdiff
havelib: Enhance documentation.
authorBruno Haible <bruno@clisp.org>
Sun, 10 May 2020 17:54:58 +0000 (19:54 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 10 May 2020 17:54:58 +0000 (19:54 +0200)
* doc/havelib.texi (Searching for Libraries): Mention the bad
consequences of using LIBxxx instead of LTLIBxxx and vice versa.

ChangeLog
doc/havelib.texi

index 019e45bec4bbb13ad838aeab750b94bffede2d2b..6ef88249c7e58d8344ec5a82dc3a8af33d34f4a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-05-10  Bruno Haible  <bruno@clisp.org>
+
+       havelib: Enhance documentation.
+       * doc/havelib.texi (Searching for Libraries): Mention the bad
+       consequences of using LIBxxx instead of LTLIBxxx and vice versa.
+
 2020-05-10  Bruno Haible  <bruno@clisp.org>
 
        attribute: Clarify list of attributes.
index a776d526d5d702bf12309bf4353d5891c89c8007..59126c708a3dce75134926c1cc044bc678aa860e 100644 (file)
@@ -79,6 +79,17 @@ when linking with libtool.  Both @code{LTLIB<@var{NAME}>} and
 @samp{-Wl,-rpath}, @code{LTLIB<@var{NAME}>} contains platform independent
 flags like @samp{-R}.
 
+If you, by mistake, use @code{LIB<@var{NAME}>} instead of
+@code{LTLIB<@var{NAME}>} when linking with libtool, you will observe that the
+binaries created in the build dir will prefer the shared libraries in the
+installation directories over the shared libraries in the build dir; this can
+lead to all sorts of build failures, test failures, or crashes!
+
+If you, on the other hand, by mistake, use @code{LTLIB<@var{NAME}>} instead of
+@code{LIB<@var{NAME}>} when linking @emph{without} libtool, you will observe
+build failures, because the @samp{-R} options contained @code{LTLIB<@var{NAME}>}
+are not valid options to compilers such as GCC.
+
 @unnumberedsubsubsec Example of using @code{AC_LIB_LINKFLAGS}
 
 Suppose you want to use @code{libz}, the compression library.