
* py-numpy: Add Fujitsu Fortran compiler to compiler type. py-scipy: Specify Fujitsu to fcompiler types. * Create patches applicable to each version.
55 lines
2.2 KiB
Diff
55 lines
2.2 KiB
Diff
diff -urN spack-src.org/numpy/distutils/fcompiler/fj.py spack-src/numpy/distutils/fcompiler/fj.py
|
|
--- spack-src.org/numpy/distutils/fcompiler/fj.py 1970-01-01 09:00:00.000000000 +0900
|
|
+++ spack-src/numpy/distutils/fcompiler/fj.py 2020-11-16 17:55:57.608802456 +0900
|
|
@@ -0,0 +1,38 @@
|
|
+from numpy.distutils.fcompiler import FCompiler
|
|
+
|
|
+compilers = ['FJFCompiler']
|
|
+
|
|
+class FJFCompiler(FCompiler):
|
|
+ compiler_type = 'fj'
|
|
+ description = 'Fujitsu Fortran Compiler'
|
|
+
|
|
+ possible_executables = ['frt']
|
|
+ version_pattern = r'frt \(FRT\) (?P<version>[a-z\d.]+)'
|
|
+ # $ frt --version
|
|
+ # frt (FRT) x.x.x yyyymmdd
|
|
+
|
|
+ executables = {
|
|
+ 'version_cmd' : ["<F77>", "--version"],
|
|
+ 'compiler_f77' : ["frt", "-Fixed"],
|
|
+ 'compiler_fix' : ["frt", "-Fixed"],
|
|
+ 'compiler_f90' : ["frt"],
|
|
+ 'linker_so' : ["frt", "-shared"],
|
|
+ 'archiver' : ["ar", "-cr"],
|
|
+ 'ranlib' : ["ranlib"]
|
|
+ }
|
|
+ pic_flags = ['-KPIC']
|
|
+ module_dir_switch = '-M'
|
|
+ module_include_switch = '-I'
|
|
+
|
|
+ def get_flags_opt(self):
|
|
+ return ['-O3']
|
|
+ def get_flags_debug(self):
|
|
+ return ['-g']
|
|
+ def runtime_library_dir_option(self, dir):
|
|
+ return f'-Wl,-rpath={dir}'
|
|
+
|
|
+if __name__ == '__main__':
|
|
+ from distutils import log
|
|
+ from numpy.distutils import customized_fcompiler
|
|
+ log.set_verbosity(2)
|
|
+ print(customized_fcompiler('fj').get_version())
|
|
diff -urN spack-src.org/numpy/distutils/fcompiler/__init__.py spack-src/numpy/distutils/fcompiler/__init__.py
|
|
--- spack-src.org/numpy/distutils/fcompiler/__init__.py 2020-11-16 17:55:31.638677631 +0900
|
|
+++ spack-src/numpy/distutils/fcompiler/__init__.py 2020-11-16 17:56:29.978957954 +0900
|
|
@@ -746,7 +746,7 @@
|
|
'intelvem', 'intelem', 'flang')),
|
|
('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')),
|
|
('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq',
|
|
- 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor')),
|
|
+ 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor', 'fj')),
|
|
('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')),
|
|
('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')),
|
|
('irix.*', ('mips', 'gnu', 'gnu95',)),
|