libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] reorganize parsing of --mode=finish arguments


From: Paolo Bonzini
Subject: Re: [PATCH 1/2] reorganize parsing of --mode=finish arguments
Date: Thu, 12 Aug 2010 12:08:08 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

On 08/12/2010 12:58 AM, Charles Wilson wrote:
On 8/12/2010 12:12 AM, Paolo Bonzini wrote:
* libltdl/config/ltmain.m4sh (func_mode_finish): Split arguments for
directories and *.la files.  Add .la files for all directories.
---
  libltdl/config/ltmain.m4sh |  117 ++++++++++++++++++++++++++------------------
  1 files changed, 70 insertions(+), 47 deletions(-)
+      if test -d "$opt"; then
+       func_append libdirs " $opt"
+       for file in "$opt"/*.la; do
+         test -f "$file" || continue
+         if func_lalib_unsafe_p "$file"; then
+           func_append libs " $file"
+         else
+           func_warning "\`$file' is not a valid libtool archive"
+          fi
+       done

I don't think --mode=finish should modify *all* .la files found in
directories passed to it.  I think it should register directories with
ld.so (as it currently does) but only fixup .la files passed explicitly
on the command line.

To do otherwise is O(N^2) behavior: every time you install a new libtool
library, you "fix" ALL .la files in $prefix/lib (or attempt to) -- even
if most of them don't need it, or were already fixed when THEY were
installed.

Ok, I got this from this email of yours:

<Devil's advocate:>
Given all of that, it seems to me that the "correct" solution here is

  1) libtool --mode=finish should remove the '=' from .la files

  2) BUT this should be done as part of creating the installable
     package for direct deployment on $host, NOT when installing into
     $build's sysroot or creating an installable package for someone
     ELSE to install in a similar $build's sysroot (e.g. a mingw-libfoo
     RPM that is part of a mingw-focused SDK for use on Fedora)

It would be nice if #2 could be done simply by telling system
integrators to add:

    %post
    /usr/bin/libtool --mode=finish %libdir

I have no problem changing it though.

Paolo



reply via email to

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