[Numpy-discussion] Cross compile flags for tdm-gcc on mingw
Wed Mar 9 02:59:28 CST 2011
I was compiling some extensions for 32-bit python 2.5 on windows using a 64
bit gcc compiler (4.5.1). After a bit of head scratching it seems that I
needed to patch numpy/distutils/mingw32ccompiler.py to add the following
flags around where it says "set_executables":
The first flag means I want 32 bit code, the second one is to link lib-gcc
as a static library. Seems the static library part might prevent C++
exceptions being passed across dll boundaries, but I don't really know about
that, and I have an irrational fear of missing dlls.
Anyway, the -m32 option could be useful for other folks when it is
appropriate. The static versus dynamic libgcc story would depend on what the
actual answer is for exception passing. My vote would be static; since this
didn't work in the past, what will be broken?
Do these seem to be worth fixing? Python2.5 is quite old now...
Using built-in specs.
Configured with: ../../src/gcc-4.5.1/configure
-build=x86_64-w64-mingw32 --enable-targets=all --enable-libgomp --enable-lto
rror --disable-nls --disable-win32-registry
bs --enable-fully-dynamic-string --with-pkgversion=tdm64-1
Thread model: win32
gcc version 4.5.1 (tdm64-1)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion