report at bugs
Jul 10, 2012, 3:11 AM
Post #3 of 5
Martin v. Löwis <martin [at] v> added the comment:
[issue12641] Remove -mno-cygwin from distutils
[In reply to]
I just installed the cygwin gcc4 package; this gives me gcc 4.5.3. In this version, -mno-cygwin is still recognized, and gives this error message:
gcc: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.
So it seems that removing the -mno-cygwin flag is definitely incorrect, as it will result in a cygwin binary.
I then installed the mingw-gcc-core package, which gave me the utility i686-pc-mingw32-gcc, which indeed is able to create a (nearly) correct binary.
So I think we should check whether i686-pc-mingw32-gcc exists in the path, and if so, use it (without a -mno-cygwin flag). If it doesn't exist, we should continue to use gcc -mno-cygwin.
My remaining concern with i686-pc-mingw32-gcc is that it still links with msvcrt.dll in addition to linking with msvcrXY.dll; this is incorrect.
There is another concern that this applies to 32-bit mode only; in 64-bit mode, i686-w64-mingw32-gcc should be used. However, this is issue 4709.
Python tracker <report [at] bugs>
Python-bugs-list mailing list