| 4 | compilers = ['SunFCompiler'] |
| 5 | |
| 6 | class SunFCompiler(FCompiler): |
| 7 | |
| 8 | compiler_type = 'sun' |
| 9 | description = 'Sun or Forte Fortran 95 Compiler' |
| 10 | # ex: |
| 11 | # f90: Sun WorkShop 6 update 2 Fortran 95 6.2 Patch 111690-10 2003/08/28 |
| 12 | version_match = simple_version_match( |
| 13 | start=r'f9[05]: (Sun|Forte|WorkShop).*Fortran 95') |
| 14 | |
| 15 | executables = { |
| 16 | 'version_cmd' : ["<F90>", "-V"], |
| 17 | 'compiler_f77' : ["f90"], |
| 18 | 'compiler_fix' : ["f90", "-fixed"], |
| 19 | 'compiler_f90' : ["f90"], |
| 20 | 'linker_so' : ["<F90>", "-Bdynamic", "-G"], |
| 21 | 'archiver' : ["ar", "-cr"], |
| 22 | 'ranlib' : ["ranlib"] |
| 23 | } |
| 24 | module_dir_switch = '-moddir=' |
| 25 | module_include_switch = '-M' |
| 26 | pic_flags = ['-xcode=pic32'] |
| 27 | |
| 28 | def get_flags_f77(self): |
| 29 | ret = ["-ftrap=%none"] |
| 30 | if (self.get_version() or '') >= '7': |
| 31 | ret.append("-f77") |
| 32 | else: |
| 33 | ret.append("-fixed") |
| 34 | return ret |
| 35 | def get_opt(self): |
| 36 | return ['-fast', '-dalign'] |
| 37 | def get_arch(self): |
| 38 | return ['-xtarget=generic'] |
| 39 | def get_libraries(self): |
| 40 | opt = [] |
| 41 | opt.extend(['fsu', 'sunmath', 'mvec']) |
| 42 | return opt |
| 43 | |
| 44 | def runtime_library_dir_option(self, dir): |
| 45 | return '-R%s' % dir |
| 46 | |
| 47 | if __name__ == '__main__': |
| 48 | from distutils import log |
nothing calls this directly
no test coverage detected