bug-gnulib
[Top][All Lists]
Advanced

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

havelib: Enhance documentation


From: Bruno Haible
Subject: havelib: Enhance documentation
Date: Sun, 10 May 2020 19:57:38 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; )

This patch adds a reminder about the consequences of a simple mistake.


2020-05-10  Bruno Haible  <address@hidden>

        havelib: Enhance documentation.
        * doc/havelib.texi (Searching for Libraries): Mention the bad
        consequences of using LIBxxx instead of LTLIBxxx and vice versa.

diff --git a/doc/havelib.texi b/doc/havelib.texi
index a776d52..59126c7 100644
--- a/doc/havelib.texi
+++ b/doc/havelib.texi
@@ -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.




reply via email to

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