libtool
[Top][All Lists]
Advanced

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

Re: inter-library-dependency, how?


From: Bob Friesenhahn
Subject: Re: inter-library-dependency, how?
Date: Mon, 21 Nov 2011 09:31:03 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Mon, 21 Nov 2011, Bert Wesarg wrote:
Christian and I independently solved this with the following fix:

diff --git i/libltdl/config/ltmain.m4sh w/libltdl/config/ltmain.m4sh
index ca67c8a..f79ab5b 100644 libltdl/config/ltmain.m4sh
--- i/libltdl/config/ltmain.m4sh
+++ w/libltdl/config/ltmain.m4sh
@@ -6391,8 +6391,7 @@ func_mode_link ()
           # Pragmatically, this seems to cause very few problems in
           # practice:
           case $deplib in
-           -L*) new_libs="$deplib $new_libs" ;;
-           -R*) ;;
+           -L*|-R*) new_libs="$deplib $new_libs" ;;
           *)
             # And here is the reason: when a library appears more
             # than once as an explicit dependence of a library, or

With this patch, the -R flag inside the dependency_libs list is honored and appropriately added to the link command.

Is there anything wrong with this approach. If not we propose this patch for inclusion. A proper ChangeLog and Signed-of-by line will follow than. I will also try to transform Christians example into an test than.

Yes, I think that there is something wrong with this approach. The -R option should not be used to find libraries at link time. Libraries present in the run-time linker search path at link time are not necessarily the correct ones to be used for linking. Run-time linker search path and link-time linker search path are totally different things.

Bob
--
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/



reply via email to

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