From: Howard Chu Date: Sat, 29 Oct 2005 14:21:45 +0000 (+0000) Subject: * ltmain.in (link mode): With `-static', only link statically X-Git-Tag: release-1-5-22~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26606d7e99cd11f9d1ff521ee62b87c615ef4562;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 2a37ec692..d0585fd85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-10-29 Howard Chu + + * 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 * libtoolize.in: Fail if libltdl files not present but diff --git a/NEWS b/NEWS index 4c57865f5..57a6e03f7 100644 --- 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. New in 1.5.20: 2005-08-31; CVS version 1.5.19a, Libtool team: diff --git a/ltmain.in b/ltmain.in index 4de053a48..0f20c96f0 100644 --- 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