On 27/11/10 6:32, [email protected] via RT wrote:
> The last proposed change would break the build for mingw done under
> cygwin, since the -mno-cygwin flag is critical there. The only place
> I see where OPENSSL_SYSNAME_WIN32 is used is to define MS_STATIC.
> MS_STATIC is used in 20 places in the code. Are you proposing that
> MS_STATIC be changed in all 20 places for mingw, or just for the
> instance in crypto/evp? Should the "static" flag be removed in all?
i am asking for OPENSSL_SYSNAME_WIN32 to be defined for MinGW targets
just the same as it is for MSVC targets; this will in effect disable
that MS_STATIC wherever it is used.
i don't know if building for old versions of Windows is even still
supported; but it appears that on at least XP, (accidentally) using
MS_STATIC can lead to spurious crashes when these static structures get
re-used and not cleaned up as they would have been if they were not static.
so a follow-up problem here may be to actually check these uses of
MS_STATIC and see if they are safe - my guess is that they have been
forgotten and they are not sane to use anymore.
>
> The configure settings for mingw were clearly written with compiling
> from cygwin in mind. Perhaps the cygwin build and the MSYS builds are
> now different enough, that what you may really be asking for is a new
> target for mingw built under MSYS. You could give it a name such as
> "mingw-msys" or rename the old configuration to "mingw-cygwin". That
> way, each could be tweaked separately.
i should have been clearer; i do compile from Cygwin. but i use the
cross-compilers provided by Cygwin under the names i686-w64-mingw32 and
x86_64-w64-mingw32 (they come from the mingw-w64 project).
the former compiles for x86, the latter for x64.
to compile for x86, i use:
./Configure mingw --cross-compile-prefix=i686-w64-mingw32-
for x64, i use:
./Configure mingw64 --cross-compile-prefix=x86_64-w64-mingw32-
but of course i remove the deprecated -mno-cygwin flag first. i'm not
sure how people are still able to use it from Cygwin; all i get if i do
a simple "./Configure mingw" then "make" is:
"gcc: The -mno-cygwin flag has been removed; use a mingw-targeted
cross-compiler."
then it errors out before even compiling the first object.
the warning makes perfect sense; compiling from Cygwin using Cygwin's
compiler is only supposed to build openssl versions linked to Cygwin's
DLLs. but here, we are cross-compiling from the Cygwin environment to an
actual Windows environment, so a cross-compiler has to be used. the
mingw-w64 ones i exposed above are the only cross-compilers currently
available by default in Cygwin.
Zouzou
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]