From fb1cf1f45900b3512e3311350b0cac34bf27ddd5 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Mon, 8 Jan 2018 11:43:30 -0600 Subject: [PATCH 2/4] simplify arch flags --- numpy/distutils/fcompiler/gnu.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index 0ebbe79..56e9be5 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -306,20 +306,9 @@ class Gnu95FCompiler(GnuFCompiler): g2c = 'gfortran' def _universal_flags(self, cmd): - """Return a list of -arch flags for every supported architecture.""" if not sys.platform == 'darwin': return [] - arch_flags = [] - # get arches the C compiler gets. - c_archs = self._c_arch_flags() - if "i386" in c_archs: - c_archs[c_archs.index("i386")] = "i686" - # check the arches the Fortran compiler supports, and compare with - # arch flags from C compiler - for arch in ["ppc", "i686", "x86_64", "ppc64"]: - if _can_target(cmd, arch) and arch in c_archs: - arch_flags.extend(["-arch", arch]) - return arch_flags + return ['-m' + platform.architecture()[0][:2]] def get_flags(self): flags = GnuFCompiler.get_flags(self) -- 2.7.4