|
From: | Peter Rosin |
Subject: | Re: "Run tests with low max_cmd_len" on MSYS/MSVC |
Date: | Thu, 22 Jan 2009 13:08:00 +0100 |
User-agent: | Thunderbird 2.0.0.19 (Windows/20081209) |
Den 2009-01-21 22:54, skrev Ralf Wildenhues:
Hi Peter, * Peter Rosin wrote on Wed, Jan 21, 2009 at 02:26:36AM CET:This patch together with [1] and [2] will make "Run tests with low max_cmd_len" on MSYS/MSVC behave the same as the individual tests. The patch fixes a couple more of the /abs/path issues already fixed in [1] and [2]. However, I fear that these hunks may be more controversial, as they touch code that affects other platforms as well.Well, for non-w32 systems the patch is pretty obviously ok, as func_to_host_path doesn't do much there, and not slowly. :-) For Cygwin and MinGW, it will likely make things much slower, since this will cause lots of forks.
Indeed.
From a correctness perspective, the patch looks good to go, though.
For MinGW yes, for Wine this is probably not needed (Wine allows opening both posix and win32 files in its CreateFile implementation), and for Cygwin it is probably at least theoretically wrong (but it might work, I don't know how liberal open is in Cygwin...) As soon as you try to use Cygwin to launch native Win32 programs you are on thin ice. So, libtool on Cygwin should IMHO assume that the MinGW toolchain is a Cygwin hosted MinGW targeting toolchain. If the MinGW toolchain is like that - and I believe that both the soon historic "gcc -mno-cygwin" as well as the new "i686-pc-mingw32-gcc" toolchains are - then libtool has no business tampering with the posix paths using "cygpath -w" in these cases. Maybe there should be a second (optional) arg to func_to_host_path that indicates why you want to convert the path? Or perhaps a new func_to_toolchain_path that only converts the path if the toolchain isn't really for $host? I.e. is instead running in some kind of emulator or in some other subsystem or otherwise has a different notion of paths (like MSVC on MSYS). But when to use func_to_toolchain_path would be system specific as it is only needed on MSYS when MSYS for one reason or another fails to convert the path (an /absolute/path is stored in a command file or appears after some prefix on the command line that MSYS doesn't recognize, e.g. -out:/absolute/path). On Cygwin it would be needed for all /absolute/paths passed to the toolchain. On Wine it wouldn't be wrong to do as on Cygwin, but it would perhaps be overkill to always convert as Wine handles posix paths in CreateFile. Cheers, Peter
[Prev in Thread] | Current Thread | [Next in Thread] |