libtool-patches
[Top][All Lists]
Advanced

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

Re: Make ar-lib support backslashed files in archives. (was [PATCH 0/7]


From: Stefano Lattarini
Subject: Re: Make ar-lib support backslashed files in archives. (was [PATCH 0/7] Support for toolchains that are not $host-native.)
Date: Thu, 2 Sep 2010 18:44:34 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Thursday 02 September 2010, Peter Rosin wrote:
> It is actually a bug in ar-lib. When you issue
>       .../ar-lib lib x foo.lib
> it runs this loop:
> 
>     $AR -NOLOGO -LIST "$archive" | while read member
>     do
>       $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
>     done
> 
> (with archive=foo.lib)
> 
> and that reads members from the archive but breaks if there's a
> backslash in one of the members. This works much better:
> 
>     $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member; 
> do
>       $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
>     done
Given that Solaris 10 /bin/sh, /usr/xpg4/bin/sh and /bin/ksh do not support
(or fail to honour) the `-r' option of the read builtin (bummer!), your fix
seems the best one to me.  But wait for Ralf's review, as he might know better.

Regards,
  Stefano




reply via email to

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