summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2010-10-16 22:18:54 +0300
committerPearu Peterson <pearu.peterson@gmail.com>2010-10-16 22:18:54 +0300
commit9dd7c7b8ad826beefbbc0c10ff457c62f1be223d (patch)
tree8b377a512813eae1ace1b5acfa348a85f1f866e5 /numpy/distutils/fcompiler
parent43b05fdd1c0ba1c6686297d16d257985dd986d3b (diff)
downloadnumpy-9dd7c7b8ad826beefbbc0c10ff457c62f1be223d.tar.gz
UPDATE: gcc-4 series do not support -mno-cygwin option.
Diffstat (limited to 'numpy/distutils/fcompiler')
-rw-r--r--numpy/distutils/fcompiler/gnu.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py
index 632c6d97a..dd1fbb2cc 100644
--- a/numpy/distutils/fcompiler/gnu.py
+++ b/numpy/distutils/fcompiler/gnu.py
@@ -224,7 +224,17 @@ class Gnu95FCompiler(GnuFCompiler):
v = self.gnu_version_match(version_string)
if not v or v[0] != 'gfortran':
return None
- return v[1]
+ v = v[1]
+ if v>='4.':
+ # gcc-4 series releases do not support -mno-cygwin option
+ pass
+ else:
+ # use -mno-cygwin flag for gfortran when Python is not Cygwin-Python
+ if sys.platform == 'win32':
+ for key in ['version_cmd', 'compiler_f77', 'compiler_f90',
+ 'compiler_fix', 'linker_so', 'linker_exe']:
+ self.executables[key].append('-mno-cygwin')
+ return v
# 'gfortran --version' results:
# XXX is the below right?
@@ -248,12 +258,6 @@ class Gnu95FCompiler(GnuFCompiler):
'linker_exe' : [None, "-Wall"]
}
- # use -mno-cygwin flag for g77 when Python is not Cygwin-Python
- if sys.platform == 'win32':
- for key in ['version_cmd', 'compiler_f77', 'compiler_f90',
- 'compiler_fix', 'linker_so', 'linker_exe']:
- executables[key].append('-mno-cygwin')
-
module_dir_switch = '-J'
module_include_switch = '-I'