This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rpetrov
Recipients christian.heimes, dstanek, jayvee, ocean-city, rpetrov
Date 2008-09-24.09:52:48
SpamBayes Score 7.771561e-16
Marked as misclassified No
Message-id <1222249970.09.0.42801790455.issue2445@psf.upfronthosting.co.za>
In-reply-to
Content
May be check for compiler.compiler_type (from sysconfig.py ) has to be
replaced with a check for descendant classes of UnixCCompiler, i.e. to
include mingw32 too ?

Also CygwinCCompiler __init__ has to be reviewed too. As example :
-------------
        # Hard-code GCC because that's what this is all about.
        # XXX optimization, warnings etc. should be customizable.
        self.set_executables(compiler='gcc -mcygwin -O -Wall',
        .....
-------------
May override in unexpected way settings from customize_compiler.

I thin that proposed modification in sysconfig.py with removing(or
replacing)  of self.set_executables from CygwinCCompiler __init__  will
help me for issue3871 (cross building python for mingw32 with distutils). 

As example I will remove a hack in the setup.py:
-----------------------
@@ -196,8 +196,26 @@
         if compiler is not None:
             (ccshared,cflags) =
sysconfig.get_config_vars('CCSHARED','CFLAGS')
             args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
+
+        # FIXME: Is next correct ?
+        # To link modules we need LDSHARED passed to setup.py otherwise
+        # distutils will use linker from build system if cross-compiling.
+        linker_so = os.environ.get('LDSHARED')
+        if linker_so is not None:
+            args['linker_so'] = linker_so
+
         self.compiler.set_executables(**args)
-----------------------
Thanks to Hirokazu who point me, in an another thread, that cygwin build
don't use CygwinCCompiler.
History
Date User Action Args
2008-09-24 09:52:50rpetrovsetrecipients: + rpetrov, dstanek, ocean-city, christian.heimes, jayvee
2008-09-24 09:52:50rpetrovsetmessageid: <1222249970.09.0.42801790455.issue2445@psf.upfronthosting.co.za>
2008-09-24 09:52:49rpetrovlinkissue2445 messages
2008-09-24 09:52:48rpetrovcreate