libtool-patches
[Top][All Lists]
Advanced

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

Re: func_convert_file_cygwin_to_w32 woes


From: Peter Rosin
Subject: Re: func_convert_file_cygwin_to_w32 woes
Date: Fri, 07 Jan 2011 09:02:00 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Den 2011-01-06 21:29 skrev Ralf Wildenhues:
> [ dropping libtool@ ]
> 
> Hi Peter,
> 
> thanks for working on this!
> 
> * Peter Rosin wrote on Tue, Jan 04, 2011 at 05:44:58PM CET:
>> Subject: [PATCH] Convert ranlib argument to toolchain format.
> 
>> --- a/libltdl/config/ltmain.m4sh
>> +++ b/libltdl/config/ltmain.m4sh
>> @@ -2412,6 +2412,8 @@ func_mode_install ()
>>  
>>        # Set up the ranlib parameters.
>>        oldlib="$destdir/$name"
>> +      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
>> +      tool_oldlib=$func_to_tool_file_result
> 
> Why does the $old_striplib command a few lines below this one not need
> to use $tool_oldlib?

Spot on (as usual), I managed to look past that one...

> Dan, can you try 'make install-strip'?
> 
>>        func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
>>  
>> @@ -8370,6 +8372,8 @@ EOF
>>          esac
>>        done
>>      fi
>> +    func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
>> +    tool_oldlib=$func_to_tool_file_result
>>      eval cmds=\"$old_archive_cmds\"
>>  
>>      func_len " $cmds"
> [...]
> 
> * Peter Rosin wrote on Wed, Jan 05, 2011 at 11:06:09AM CET:
>> Den 2011-01-05 05:30 skrev Dan McMahill:
>>> On 1/4/2011 11:44 AM, Peter Rosin wrote:
>>>> Ok, I found a couple of minutes to look at this. Can you check if this
>>>> patch helps?
>>>>
>>>> (It still needs a ChangeLog etc...)
> 
> The patch is OK with me if you fix the missing bits, and address the
> above.
> 
>> Before I tie up the lose ends with this patch, I wonder if Ralf (or someone
>> else) could tell me if I should also fix the other assignments of
>> old_archive_cmds -- such as in the below snippet -- or is that completely
>> irrelevant?
> 
> I wouldn't change them without being sure that the changes are
> necessary.

Well, they are necessary, but in cases which are, errhm, convoluted...

Such as: win32-hosted cross-tools (I mean native win32 here, not
dependent on Cygwin or MSYS) for targeting irix (or whatever) and
running them from Cygwin (or Wine) instead of MSYS.

I think I'll skip the extra changes, as someone doing the above needs
a clue-bat anyway.

Here's what I have now, I'm only awaiting input on the THANKS addition
from Dan.

Cheers,
Peter

>From 6de4a15cecc38f0ba2ade4d3ac1d8a24e1160a31 Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
Date: Fri, 7 Jan 2011 09:00:10 +0100
Subject: [PATCH] Convert file name to toolchain format when blessing archives.

* libltdl/config/ltmain.m4sh (func_mode_install): When executing
old_postinstall_cmds and old_archive_cmds, convert $oldlib to a
format appropriate for the tool and provide that in $tool_oldlib.
Also use $tool_oldlib when stripping old libraries.
* libltdl/m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE): Use $tool_oldlib
as argument to $RANLIB.
* THANKS: Update.
Report by Dan McMahill.

Signed-off-by: Peter Rosin <address@hidden>
---
 ChangeLog                  |   12 ++++++++++++
 THANKS                     |    1 +
 libltdl/config/ltmain.m4sh |    6 +++++-
 libltdl/m4/libtool.m4      |    6 +++---
 4 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4a65c9e..bcbc448 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-07  Peter Rosin  <address@hidden>
+
+       Convert file name to toolchain format when blessing archives.
+       * libltdl/config/ltmain.m4sh (func_mode_install): When executing
+       old_postinstall_cmds and old_archive_cmds, convert $oldlib to a
+       format appropriate for the tool and provide that in $tool_oldlib.
+       Also use $tool_oldlib when stripping old libraries.
+       * libltdl/m4/libtool.m4 (_LT_CMD_OLD_ARCHIVE): Use $tool_oldlib
+       as argument to $RANLIB.
+       * THANKS: Update.
+       Report by Dan McMahill.
+
 2011-01-02  Ralf Wildenhues  <address@hidden>
 
        Bump copyright years.
diff --git a/THANKS b/THANKS
index 637decf..6b86c5d 100644
--- a/THANKS
+++ b/THANKS
@@ -88,6 +88,7 @@
   Christopher Hulbert          address@hidden
   Craig Tierney                        address@hidden
   Dalibor Topic                        address@hidden
+  Dan McMahill                 address@hidden
   Daniel Reed                  address@hidden
   Daniel Richard G.            address@hidden
   Dave Korn                    address@hidden
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 336d97b..476f553 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -2412,8 +2412,10 @@ func_mode_install ()
 
       # Set up the ranlib parameters.
       oldlib="$destdir/$name"
+      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+      tool_oldlib=$func_to_tool_file_result
 
-      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+      func_show_eval "$install_prog \$file \$tool_oldlib" 'exit $?'
 
       if test -n "$stripme" && test -n "$old_striplib"; then
        func_show_eval "$old_striplib $oldlib" 'exit $?'
@@ -8370,6 +8372,8 @@ EOF
            esac
          done
        fi
+       func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+       tool_oldlib=$func_to_tool_file_result
        eval cmds=\"$old_archive_cmds\"
 
        func_len " $cmds"
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 4239395..c144755 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1448,13 +1448,13 @@ old_postuninstall_cmds=
 if test -n "$RANLIB"; then
   case $host_os in
   openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
 case $host_os in
-- 
1.7.2.3



reply via email to

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