]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (link mode): With `-static', only link statically
authorHoward Chu <hyc@highlandsun.com>
Sat, 29 Oct 2005 14:21:45 +0000 (14:21 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 29 Oct 2005 14:21:45 +0000 (14:21 +0000)
against uninstalled libtool libraries.  Fixes 1.5.x regression
to match documented (and actual 1.4.x) behavior.
* NEWS: Updated.

ChangeLog
NEWS
ltmain.in

index 2a37ec692f003f8fa8a6fc8b164a6cdad40c45a7..d0585fd854483a7d82ccb9a5bd0dcfd33cfe4b8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-29  Howard Chu <hyc@highlandsun.com>
+
+       * ltmain.in (link mode): With `-static', only link statically
+       against uninstalled libtool libraries.  Fixes 1.5.x regression
+       to match documented (and actual 1.4.x) behavior.
+       * NEWS: Updated.
+
 2005-10-29  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
 
        * libtoolize.in: Fail if libltdl files not present but
diff --git a/NEWS b/NEWS
index 4c57865f5d4de4c6479ed0a732782ade9e321bc4..57a6e03f7a6f4f67a6cc10c8972a1fc5af938a8f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
 NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.5.21a: 2005-??-??; CVS version 1.5.21a, Libtool team:
+* Fix 1.5 regression that caused linking a program `-static' to also
+  link statically against installed libtool libraries, contrary to
+  documented (and actual 1.4.x) behavior.
 * Bug Fixes.
 \f
 New in 1.5.20: 2005-08-31; CVS version 1.5.19a, Libtool team:
index 4de053a484c1369ca89ae64c955fc7a4e32d5cee..0f20c96f0c0cb3e8a408cd71db6d3261b4438d37 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1088,14 +1088,15 @@ EOF
          if test -n "$link_static_flag"; then
            dlopen_self=$dlopen_self_static
          fi
+         prefer_static_libs=yes
        else
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
            dlopen_self=$dlopen_self_static
          fi
+         prefer_static_libs=built
        fi
        build_libtool_libs=no
        build_old_libs=yes
-       prefer_static_libs=yes
        break
        ;;
       esac
@@ -2445,8 +2446,12 @@ EOF
        fi
 
        link_static=no # Whether the deplib will be linked statically
+       use_static_libs=$prefer_static_libs
+       if test "$use_static_libs" = built && test "$installed" = yes ; then
+         use_static_libs=no
+       fi
        if test -n "$library_names" &&
-          { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+          { test "$use_static_libs" = no || test -z "$old_library"; }; then
          if test "$installed" = no; then
            notinst_deplibs="$notinst_deplibs $lib"
            need_relink=yes