diff options
| author | Thomas Green <tomgreen66@hotmail.com> | 2021-11-16 22:55:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-16 22:55:13 +0000 |
| commit | fbb4a6b8b1423b2da508e3ca5a3842c2da4460bc (patch) | |
| tree | cbdb744668f2603943de849993c0b5e7dcdfee23 /numpy | |
| parent | 640fff6b33eb092319160b300b80bbbe3669cd35 (diff) | |
| download | numpy-fbb4a6b8b1423b2da508e3ca5a3842c2da4460bc.tar.gz | |
Create armccompiler.py
From https://gitlab.com/arm-hpc/packages/-/wikis/packages/numpy
Added `-fPIC` due to relocation errors when building shared library from static library such as quadmath.
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/distutils/armccompiler.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/numpy/distutils/armccompiler.py b/numpy/distutils/armccompiler.py new file mode 100644 index 000000000..92385e905 --- /dev/null +++ b/numpy/distutils/armccompiler.py @@ -0,0 +1,23 @@ +from __future__ import division, absolute_import, print_function + +from distutils.unixccompiler import UnixCCompiler + +class ArmCCompiler(UnixCCompiler): + + """ + Arm compiler. + """ + + compiler_type = 'arm' + cc_exe = 'armclang' + cxx_exe = 'armclang++' + + def __init__ (self, verbose=0, dry_run=0, force=0): + UnixCCompiler.__init__ (self, verbose, dry_run, force) + cc_compiler = self.cc_exe + cxx_compiler = self.cxx_exe + self.set_executables(compiler=cc_compiler + ' -mcpu=native -O3 -fPIC', + compiler_so=cc_compiler + ' -mcpu=native -O3 -fPIC', + compiler_cxx=cxx_compiler + ' -mcpu=native -O3 -fPIC', + linker_exe=cc_compiler + ' -lamath', + linker_so=cc_compiler + ' -lamath -shared') |
