[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Make ar-lib support backslashed files in archives. (was [PATCH 0/7] Supp
From: |
Peter Rosin |
Subject: |
Make ar-lib support backslashed files in archives. (was [PATCH 0/7] Support for toolchains that are not $host-native.) |
Date: |
Thu, 02 Sep 2010 16:52:20 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 |
Hi!
[Automakers, this is from the libtool-patches list...]
Den 2010-09-02 15:06 skrev Peter Rosin:
> 112: Test 24 33 34 45 47 99 100 are "new" failures with low max_cmd_len
> and I think the reason is that the file name conversion adds escapes for
> the backslashes. I.e. .libs/a1.obj -> .libs\\a1.obj when in this case
> .libs\a1.obj is desired. 25 also fails earlier, probably due to the same
> thing. However, my previous suggestion with a naive_slashify instead of
> naive_backslashify doesn't work either since MSYS turns @c:/foobar into
> @c;c:\msys\1.0\foobar (or something similar, that was from memory) which
> we must avoid at all cost. cygpath -m (instead of -w) is fine on Cygwin
> though since Cygwin doesn't clobber @c:/foobar "for us".
>
> Maybe we can work around this by sanitizing the input files in ar-lib,
> but that seems a bit horrible to me... I'll see if I can fix this
> somehow. Suggestions welcome.
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
Ok for the msvc branch?
The code added to the test fails with old ar-lib and works with the change.
Cheers,
Peter
0001-Make-ar-lib-support-backslashed-files-in-archives.patch.txt
Description: Text document
- 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 <=
Re: [PATCH 0/7] Support for toolchains that are not $host-native., Peter Rosin, 2010/09/03