68 lines
2.8 KiB
Diff
68 lines
2.8 KiB
Diff
--- numpy-py2-1.8.0/numpy/distutils/mingw32ccompiler.py 2014-02-19 01:07:43.787600000 +0400
|
|
+++ numpy-1.8.0/numpy/distutils/mingw32ccompiler.py 2014-02-19 01:26:21.634200000 +0400
|
|
@@ -86,22 +86,6 @@
|
|
self.linker = 'g++'
|
|
|
|
# **changes: eric jones 4/11/01
|
|
- # 1. Check for import library on Windows. Build if it doesn't exist.
|
|
-
|
|
- build_import_library()
|
|
-
|
|
- # Check for custom msvc runtime library on Windows. Build if it doesn't exist.
|
|
- msvcr_success = build_msvcr_library()
|
|
- msvcr_dbg_success = build_msvcr_library(debug=True)
|
|
- if msvcr_success or msvcr_dbg_success:
|
|
- # add preprocessor statement for using customized msvcr lib
|
|
- self.define_macro('NPY_MINGW_USE_CUSTOM_MSVCR')
|
|
-
|
|
- # Define the MSVC version as hint for MinGW
|
|
- msvcr_version = '0x%03i0' % int(msvc_runtime_library().lstrip('msvcr'))
|
|
- self.define_macro('__MSVCRT_VERSION__', msvcr_version)
|
|
-
|
|
- # **changes: eric jones 4/11/01
|
|
# 2. increased optimization and turned off all warnings
|
|
# 3. also added --driver-name g++
|
|
#self.set_executables(compiler='gcc -mno-cygwin -O2 -w',
|
|
--- numpy-py2-1.8.0/numpy/distutils/fcompiler/gnu.py 2014-02-19 01:27:32.252800000 +0400
|
|
+++ numpy-1.8.0/numpy/distutils/fcompiler/gnu.py 2014-02-19 01:31:29.804200000 +0400
|
|
@@ -6,6 +6,7 @@
|
|
import warnings
|
|
import platform
|
|
import tempfile
|
|
+from sysconfig import _POSIX_BUILD
|
|
from subprocess import Popen, PIPE, STDOUT
|
|
|
|
from numpy.distutils.cpuinfo import cpu
|
|
@@ -86,7 +87,7 @@
|
|
pic_flags = ['-fPIC']
|
|
|
|
# use -mno-cygwin for g77 when Python is not Cygwin-Python
|
|
- if sys.platform == 'win32':
|
|
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
|
for key in ['version_cmd', 'compiler_f77', 'linker_so', 'linker_exe']:
|
|
executables[key].append('-mno-cygwin')
|
|
|
|
@@ -235,7 +236,7 @@
|
|
pass
|
|
else:
|
|
# use -mno-cygwin flag for gfortran when Python is not Cygwin-Python
|
|
- if sys.platform == 'win32':
|
|
+ if sys.platform == 'win32' and not _POSIX_BUILD:
|
|
for key in ['version_cmd', 'compiler_f77', 'compiler_f90',
|
|
'compiler_fix', 'linker_so', 'linker_exe']:
|
|
self.executables[key].append('-mno-cygwin')
|
|
@@ -324,13 +324,6 @@
|
|
i = opt.index("gcc")
|
|
opt.insert(i+1, "mingwex")
|
|
opt.insert(i+1, "mingw32")
|
|
- # XXX: fix this mess, does not work for mingw
|
|
- if is_win64():
|
|
- c_compiler = self.c_compiler
|
|
- if c_compiler and c_compiler.compiler_type == "msvc":
|
|
- return []
|
|
- else:
|
|
- raise NotImplementedError("Only MS compiler supported with gfortran on win64")
|
|
return opt
|
|
|
|
def get_target(self):
|