|
From: | Peter Rosin |
Subject: | Re: [PATCH] [cygwin|mingw] fix dlpreopen with --disable-static take 2 |
Date: | Tue, 06 Jan 2009 07:56:26 +0100 |
User-agent: | Thunderbird 2.0.0.19 (Windows/20081209) |
Den 2009-01-04 03:35 skrev Charles Wilson:
Peter Rosin wrote:I'm primarily trying to determine what impact this has on my MSVC branch... Den 2009-01-03 02:39 skrev Charles Wilson: *snip*+ *cygwin* | *mingw* | *cegcc* )We should strive to have fewer of these in ltmain.m4sh, not more.Yep. But the problem is, there are really two BIG categories of platforms: those that support ELF-semantics for shared libraries, and those that support PE-DLL semantics. The differences between, say, HP and Linux are in this regard much less significant than the differences between win32 (cygwin, mingw, msvc, even wince) and any *nixoid. And vice verse: cygwin and msvc are much more similar *with regards to the construction of shared libraries* than they are different (even though the implib/static lib formats are non-interchangeable). I'm not sure it would be an improvement, exactly, but we could have a libtool variable $LT_HOST_SUPPORTS_PE_DLL (or a function that takes $host), and replace many of these case $host in *cygwin* | *mingw* | *cegcc* ) ... ;; everything else ) ... ;; esac occurences with 'if host_supports_pe_dll ; then ... ; else ... ; fi' Still ugly, but it means you only have to "fix" the case "$host" pattern in one place.
I think it should be like it is for everything else, a separate control- ling variable for stuff that seem orthogonal. Many of the case $host constructs should probably be if test $LT_HOST_SUPPORTS_PE_DLL = yes (with the variable in lower case to conform), but I'm sure there are examples where the controlling variable should be named something else. I think there is value in separating these things, it serves as documentation of what pieces of ltmain.m4sh are connected to each other. It also helps when something like the MSVC branch is added as many, but not all, things are equal between MSVC and MinGW. A central function would be a step back IMHO, as a MSVC exception (or whatever exception) for some specific snippet of code would probably get uglier. It's not as if we are talking hundreds of new variables, my guess would be ten or so. But that's without looking at the code for quite some time... That said, I'm still not objecting to this patch as is, one more case $host is not going to kill us. Cheers, Peter
[Prev in Thread] | Current Thread | [Next in Thread] |