Message73696
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. |
|
Date |
User |
Action |
Args |
2008-09-24 09:52:50 | rpetrov | set | recipients:
+ rpetrov, dstanek, ocean-city, christian.heimes, jayvee |
2008-09-24 09:52:50 | rpetrov | set | messageid: <1222249970.09.0.42801790455.issue2445@psf.upfronthosting.co.za> |
2008-09-24 09:52:49 | rpetrov | link | issue2445 messages |
2008-09-24 09:52:48 | rpetrov | create | |
|