libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] [cygwin|mingw] Correct static lib symbol extraction failure.


From: Charles Wilson
Subject: Re: [PATCH] [cygwin|mingw] Correct static lib symbol extraction failure.
Date: Sun, 12 Sep 2010 11:06:33 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

On 9/12/2010 10:20 AM, Ralf Wildenhues wrote:
> I suggest you commit it so that it can be included
> in the testing.

Pushed as:

When assigning $linklib value, honor [-all]-static[-libtool-libs]

* libltdl/config/ltmain.m4sh (func_mode_link): When prefer_static_libs
and static library exists, ensure old_library name is used as $linklib.
Fixes failure on mingw when both static and shared libraries are
present.

---
 ChangeLog                  |    9 +++++++++
 libltdl/config/ltmain.m4sh |   12 +++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b9abe8a..6b76340 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-12  Charles Wilson  <...>
+
+       When assigning $linklib value, honor [-all]-static[-libtool-libs]
+
+       * libltdl/config/ltmain.m4sh (func_mode_link): When prefer_static_libs
+       and static library exists, ensure old_library name is used as $linklib.
+       Fixes failure on mingw when both static and shared libraries are
+       present.
+
 2010-09-12  Ralf Wildenhues  <...>

        tests: work around zsh use of $options variable.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 509a421..6036f4f 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -5652,9 +5652,15 @@ func_mode_link ()

        # Get the name of the library we link against.
        linklib=
-       for l in $old_library $library_names; do
-         linklib="$l"
-       done
+       if test -n "$old_library" &&
+          { test "$prefer_static_libs" = yes ||
+            test "$prefer_static_libs,$installed" = "built,no"; }; then
+         linklib=$old_library
+       else
+         for l in $old_library $library_names; do
+           linklib="$l"
+         done
+       fi
        if test -z "$linklib"; then
          func_fatal_error "cannot find name of link library for \`$lib'"
        fi
-- 
1.7.1




reply via email to

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