On 8/12/2010 9:23 PM, Paolo Bonzini wrote:
> These cover bullets 3/5 of Charles' list:
> 
> 3) issue with '# Collect and forward deplibs of preopened libtool libs'
>    In progress? Anything?
> 4,5)
>    * patch for old libtool, to not barf on '='
>    * TBD mechanism to strip '=' from .la after deployment on $host
> 6) support in libltdl for '=' in .la files
> 
> I didn't do 4...

Well, sure. We really need to discuss how to approach this. It's not
like we want to cut a new release of libtool-1.5; if people are going to
update their local libtool, we'd really rather they update to
libtool-2.2.latest, not a minor update to 1.5.

My impression was that Ralf was concerned about people who are using,
say, libtool-2.2.6 which is fairly new, but don't want to update to the
latest libtool for whatever reason.  Well, we're not going to release a
new "libtool-2.2.6b" (nor 2.2.4b, 2.2.2b, ....) for all possible old
versions of libtool.

Instead, I think we should develop a simple patch that will apply
relatively cleanly to libtool-2.2.old, and just make that available on
libtool's webpage (a link to the ml archive post?) so that people who
(a) must use an older libtool, and (b) are impacted by "rogue" .la files
that include '=', can patch their local "old" libtool manually.

But I don't think we need to worry much more than that.

Also, I don't think we need try to backport the "=" support from
libltdl-current, once we implement it, to libltdl-old.  At that point,
it becomes a distributor question: if you ship .la files with '=', then
you're requiring that all libltdl clients that access those particular
.la files must link with libltdl-new.

> I would like some help for 6... 
> Ok to push to sysroot branch?
> 
> Paolo Bonzini (4):
>   fix sysroot tests to pass on Fedora 13
>   fix sysroot handling for deplibs of preopened libtool libs
>   reorganize parsing of --mode=finish arguments
>   add libtool --mode=finish mode for sysroot

I've tested the sysroot branch, with these four patches, as well as:

[PATCH] improve code for sysroot --mode=finish
http://lists.gnu.org/archive/html/libtool-patches/2010-08/msg00143.html

[PATCH] Factor the sed command used to make a regex from a literal.
http://lists.gnu.org/archive/html/libtool-patches/2010-08/msg00144.html

and the attached correction.  I tested on:

cygwin native:
==============
old: All 122 tests passed (2 tests were not run)
new: 111 tests behaved as expected.  9 tests were skipped.


linux native:
=============
old: All 106 tests passed (*)
new: 102 tests behaved as expected. 18 tests were skipped.

(*) I don't have fortran installed. It's not clear why the fc and f77
tests aren't shown as 'skipped'.


mingw native (e.g. on "MSYS"):
==============================
old: 2 of 122 tests failed (2 tests were not run) (**)
new: in progress. will update later, but I don't expect any regressions.

(**) This is longstanding, and fixed by one of my unmerged patches. Not
a regression.

linux->mingw (cross compiler has sysroot):
==========================================
tested new(118-120), the sysroot.at tests. all pass

cygwin->mingw (cross compiler has sysroot):
==========================================
tested new(118-120), the sysroot.at tests. all pass


Here is the patch I found necessary:

2010-08-15  Charles Wilson  <...>

        * libltdl/config/ltmain.m4sh (func_mode_finish): Fix logic
        bug in $opt_dry_run test.

So, the current status of this series (the original four patches, plus
the two corrections referenced above, plus the attached fix) is as follows:

  1/4: ok
  2/4: mental note: not covered by testsuite
  3/4: fix log entry; libltdl.m4sh around line 1397 should use
          for opt in "$nonopt" ${1+"$@"}
       instead of
          for opt in "$nonopt" "$@"
  4/4: some .texi changes:
       Ralf> This is fine with me, but I think it wouldn't hurt
       Ralf> if we mentioned 'sysroot' explicitly here.  You can
       Ralf> of course also just do this when you add general
       Ralf> description of --with-sysroot.

One those are addressed, I think this series would be ready for the
sysroot branch.  After that, all we have left are: backport patch for
old libtool+'=' in .la files (discussed above), and support in (new)
libltdl for '=' in .la files, and we'll be ready to merge to master. I
think.

--
Chuck
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 8fc7a35..06dcdf6 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -1427,7 +1427,11 @@ func_mode_finish ()
       fi
 
       # Remove sysroot references
-      if $opt_dry_run; then
+      if ${opt_dry_run-false}; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+        done
+      else
         tmpdir=`func_mktempdir`
         for lib in $libs; do
 	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
@@ -1435,10 +1439,6 @@ func_mode_finish ()
 	  mv -f $tmpdir/tmp-la $lib
 	done
         ${RM}r "$tmpdir"
-      else
-        for lib in $libs; do
-          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
-        done
       fi
     fi
 

Reply via email to