summaryrefslogtreecommitdiff
path: root/scipy_distutils/sunfcompiler.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2004-01-19 13:42:53 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2004-01-19 13:42:53 +0000
commitebeb16d01af0cbb47a7a268c663b0a357b64c59f (patch)
tree2f9d70464eef41d109fbd97c17c072d14d9aad09 /scipy_distutils/sunfcompiler.py
parentc879ef7d77eb19cb4d795e4550573de9c58955b4 (diff)
downloadnumpy-ebeb16d01af0cbb47a7a268c663b0a357b64c59f.tar.gz
Added lahey,pg compilers, renamed forte to sun.
Diffstat (limited to 'scipy_distutils/sunfcompiler.py')
-rw-r--r--scipy_distutils/sunfcompiler.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/scipy_distutils/sunfcompiler.py b/scipy_distutils/sunfcompiler.py
new file mode 100644
index 000000000..dd51b6360
--- /dev/null
+++ b/scipy_distutils/sunfcompiler.py
@@ -0,0 +1,39 @@
+import os
+import sys
+
+from cpuinfo import cpu
+from fcompiler import FCompiler
+
+class SunFCompiler(FCompiler):
+
+ compiler_type = 'sun'
+ version_pattern = r'(f90|f95): (Sun|Forte Developer 7) Fortran 95 (?P<version>[^\s]+).*'
+
+ executables = {
+ 'version_cmd' : ["f90", "-V"],
+ 'compiler_f77' : ["f90", "-f77", "-ftrap=%none"],
+ 'compiler_fix' : ["f90", "-fixed"],
+ 'compiler_f90' : ["f90"],
+ 'linker_so' : ["f90","-Bdynamic","-G"],
+ 'archiver' : ["ar", "-cr"],
+ 'ranlib' : ["ranlib"]
+ }
+
+ def get_flags(self):
+ return ['-xcode=pic32']
+ def get_opt(self):
+ return ['-fast','-dalign']
+ def get_arch(self):
+ return ['-xtarget=generic']
+ def get_libraries(self):
+ opt = FCompiler.get_libraries(self)
+ opt.extend(['fsu','sunmath','mvec','f77compat'])
+ return opt
+
+if __name__ == '__main__':
+ from distutils import log
+ log.set_verbosity(2)
+ from fcompiler import new_fcompiler
+ compiler = new_fcompiler(compiler='sun')
+ compiler.customize()
+ print compiler.get_version()