[Top][All Lists]
[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
- Re: [PATCH 4/7] Use func_to_tool_file instead of fix_srcfile_path., (continued)
- [PATCH 7/7] Prefer $NM @file over calculating the cmd line length., Peter Rosin, 2010/09/01
- [PATCH 6/7] Convert file name to toolchain format when invoking $NM., Peter Rosin, 2010/09/01
- [PATCH 5/7] Convert POSIX file names to toolchain format for MSVC, Peter Rosin, 2010/09/01
- Re: [PATCH 0/7] Support for toolchains that are not $host-native., Peter Rosin, 2010/09/02
- Make ar-lib support backslashed files in archives. (was [PATCH 0/7] Support for toolchains that are not $host-native.), Peter Rosin, 2010/09/02
- Re: Make ar-lib support backslashed files in archives. (was [PATCH 0/7] Support for toolchains that are not $host-native.),
Stefano Lattarini <=
- Re: [PATCH 0/7] Support for toolchains that are not $host-native., Peter Rosin, 2010/09/03