[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ITS#3977 libtool 1.5.18 and installed libraries



--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello again,

* Ralf Wildenhues wrote on Sun, Sep 25, 2005 at 01:14:57PM CEST:
> 
> Sorry for the long response delay.

If I may repeat that.. :-/

Applied to CVS HEAD and branch-1-5, respectively.

Cheers, and sorry again,
Ralf

2005-10-29  Howard Chu  <hyc@highlandsun.com>

        * libltdl/config/ltmain.m4sh (func_mode_link):
        With `-static', only link statically against uninstalled
        libtool libraries.  Fixes 1.5.x regression to match documented
        behavior.
        * NEWS: Updated.

--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="chu-static-HEAD.diff"

2005-10-29  Howard Chu  <hyc@highlandsun.com>

        * libltdl/config/ltmain.m4sh (func_mode_link):
        With `-static', only link statically against uninstalled
        libtool libraries.  Fixes 1.5.x regression to match documented
        behavior.
        * NEWS: Updated.

Index: NEWS
===================================================================
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.187
diff -u -r1.187 NEWS
--- NEWS	26 Oct 2005 10:42:03 -0000	1.187
+++ NEWS	29 Oct 2005 14:17:14 -0000
@@ -26,6 +26,8 @@
 * Detection of compiler wrappers like distcc/ccache and $host_alias prefix.
 * Initial Support for FC (modern Fortran).
 * Fixed a regression that prevented use of libltdl without autotools.
+* Fixed a branch-1-5/HEAD regression to only link uninstalled libraries
+  statically with `-static'.
 * Bug fixes.
 
 New in 1.9f: 2004-10-23; CVS version 1.9e, Libtool team:
Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.14
diff -u -r1.14 ltmain.m4sh
--- libltdl/config/ltmain.m4sh	17 Oct 2005 14:06:36 -0000	1.14
+++ libltdl/config/ltmain.m4sh	29 Oct 2005 14:17:16 -0000
@@ -2218,14 +2218,15 @@
 	    compile_command="$compile_command $link_static_flag"
 	    finalize_command="$finalize_command $link_static_flag"
 	  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
@@ -3598,8 +3599,12 @@
 	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
 	  case $host in
 	  *cygwin* | *mingw*)
 	      # No point in relinking DLLs because paths are not encoded

--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="chu-static-1-5.diff"

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.

Index: NEWS
===================================================================
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.109.2.36
diff -u -r1.109.2.36 NEWS
--- NEWS	31 Aug 2005 19:19:41 -0000	1.109.2.36
+++ NEWS	29 Oct 2005 14:17:57 -0000
@@ -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:
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.91
diff -u -r1.334.2.91 ltmain.in
--- ltmain.in	18 Oct 2005 07:26:05 -0000	1.334.2.91
+++ ltmain.in	29 Oct 2005 14:17:59 -0000
@@ -1088,14 +1088,15 @@
 	  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 @@
 	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

--FL5UXtIhxfXey3p5--