diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index 0ebbe79..465a502 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -167,7 +167,7 @@ class GnuFCompiler(FCompiler): return None def get_libgfortran_dir(self): - if sys.platform[:5] == 'linux': + if sys.platform[:5] == 'linux' and platform.machine() != "e2k": libgfortran_name = 'libgfortran.so' elif sys.platform == 'darwin': libgfortran_name = 'libgfortran.dylib' @@ -208,7 +208,7 @@ class GnuFCompiler(FCompiler): def get_libraries(self): opt = [] d = self.get_libgcc_dir() - if d is not None: + if d is not None and self.g2c is not None: g2c = self.g2c + '-pic' f = self.static_lib_format % (g2c, self.static_lib_extension) if not os.path.isfile(os.path.join(d, f)): @@ -304,6 +304,8 @@ class Gnu95FCompiler(GnuFCompiler): module_include_switch = '-I' g2c = 'gfortran' + if platform.machine() == "e2k": + g2c = None def _universal_flags(self, cmd): """Return a list of -arch flags for every supported architecture.""" diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py index 65d7de3..056e4fb 100644 --- a/numpy/distutils/system_info.py +++ b/numpy/distutils/system_info.py @@ -1463,7 +1463,8 @@ def get_atlas_version(**config): s, o = c.get_output(atlas_version_c_text, libraries=libraries, library_dirs=library_dirs, use_tee=(system_info.verbosity > 0)) - if s and re.search(r'undefined reference to `_gfortran', o, re.M): + if s and re.search(r'undefined reference to `_gfortran', o,re.M) \ + and platform.machine() != "e2k": s, o = c.get_output(atlas_version_c_text, libraries=libraries + ['gfortran'], library_dirs=library_dirs,