summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler/gnu.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-11-06 12:52:26 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-11-06 12:52:26 +0000
commit4f5f865e9fd5fab31d85987d93ed9e34bf83655b (patch)
tree1566c02b884fc9cdcc224b46b95cd8c9fa82ada4 /numpy/distutils/fcompiler/gnu.py
parent81c23fb31aa97e0b66df3ae1889c93c1d524fa98 (diff)
downloadnumpy-4f5f865e9fd5fab31d85987d93ed9e34bf83655b.tar.gz
Remove cpu/arch specific optimization flags for GNU fortran compilers: they are too fragile, and are more likely not that useful anyway.
Diffstat (limited to 'numpy/distutils/fcompiler/gnu.py')
-rw-r--r--numpy/distutils/fcompiler/gnu.py98
1 files changed, 1 insertions, 97 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py
index b281cb5c1..bd9284ba7 100644
--- a/numpy/distutils/fcompiler/gnu.py
+++ b/numpy/distutils/fcompiler/gnu.py
@@ -178,103 +178,7 @@ class GnuFCompiler(FCompiler):
return opt
def get_flags_arch(self):
- opt = []
- if sys.platform == 'darwin':
- # Since Apple doesn't distribute a GNU Fortran compiler, we
- # can't add -arch ppc or -arch i386, as only their version
- # of the GNU compilers accepts those.
- for a in '601 602 603 603e 604 604e 620 630 740 7400 7450 750'\
- '403 505 801 821 823 860'.split():
- if getattr(cpu,'is_ppc%s'%a)():
- opt.append('-mcpu='+a)
- opt.append('-mtune='+a)
- break
- return opt
-
- # default march options in case we find nothing better
- if cpu.is_i686():
- march_opt = '-march=i686'
- elif cpu.is_i586():
- march_opt = '-march=i586'
- elif cpu.is_i486():
- march_opt = '-march=i486'
- elif cpu.is_i386():
- march_opt = '-march=i386'
- else:
- march_opt = ''
-
- gnu_ver = self.get_version()
-
- if gnu_ver >= '0.5.26': # gcc 3.0
- if cpu.is_AthlonK6():
- march_opt = '-march=k6'
- elif cpu.is_AthlonK7():
- march_opt = '-march=athlon'
-
- if gnu_ver >= '3.1.1':
- if cpu.is_AthlonK6_2():
- march_opt = '-march=k6-2'
- elif cpu.is_AthlonK6_3():
- march_opt = '-march=k6-3'
- elif cpu.is_AthlonMP():
- march_opt = '-march=athlon-mp'
- # there's also: athlon-tbird, athlon-4, athlon-xp
- elif cpu.is_Nocona():
- march_opt = '-march=nocona'
- elif cpu.is_Core2():
- march_opt = '-march=nocona'
- elif cpu.is_Xeon() and cpu.is_64bit():
- march_opt = '-march=nocona'
- elif cpu.is_Prescott():
- march_opt = '-march=prescott'
- elif cpu.is_PentiumIV():
- march_opt = '-march=pentium4'
- elif cpu.is_PentiumIII():
- march_opt = '-march=pentium3'
- elif cpu.is_PentiumM():
- march_opt = '-march=pentium3'
- elif cpu.is_PentiumII():
- march_opt = '-march=pentium2'
-
- if gnu_ver >= '3.4':
- # Actually, I think these all do the same things
- if cpu.is_Opteron():
- march_opt = '-march=opteron'
- elif cpu.is_Athlon64():
- march_opt = '-march=athlon64'
- elif cpu.is_AMD64():
- march_opt = '-march=k8'
-
- if gnu_ver >= '3.4.4':
- if cpu.is_PentiumM():
- march_opt = '-march=pentium-m'
- # Future:
- # if gnu_ver >= '4.3':
- # if cpu.is_Core2():
- # march_opt = '-march=core2'
-
- # Note: gcc 3.2 on win32 has breakage with -march specified
- if '3.1.1' <= gnu_ver <= '3.4' and sys.platform=='win32':
- march_opt = ''
-
- if march_opt:
- opt.append(march_opt)
-
- # other CPU flags
- if gnu_ver >= '3.1.1':
- if cpu.has_mmx(): opt.append('-mmmx')
- if cpu.has_3dnow(): opt.append('-m3dnow')
-
- if gnu_ver > '3.2.2':
- if cpu.has_sse2(): opt.append('-msse2')
- if cpu.has_sse(): opt.append('-msse')
- if gnu_ver >= '3.4':
- if cpu.has_sse3(): opt.append('-msse3')
- if cpu.is_Intel():
- opt.append('-fomit-frame-pointer')
- if cpu.is_32bit():
- opt.append('-malign-double')
- return opt
+ return []
class Gnu95FCompiler(GnuFCompiler):
compiler_type = 'gnu95'