summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler/intel.py
diff options
context:
space:
mode:
authorNick Papior Andersen <nickpapior@gmail.com>2015-02-27 08:14:59 +0000
committerNick Papior Andersen <nickpapior@gmail.com>2015-02-27 08:14:59 +0000
commit525f0cd85fa270ee0fb843a8cfdd21dfe98238cd (patch)
treef24c95ff49417f7de5828182cd00e02a30959d77 /numpy/distutils/fcompiler/intel.py
parent29b9480f62fd01b6d19da39391bd522cc66bdc6b (diff)
downloadnumpy-525f0cd85fa270ee0fb843a8cfdd21dfe98238cd.tar.gz
BUG: rpath was not implemented for numpy.distutils.fcompiler
This bug-fix only applies for non gnu-compilers. The fortran compilers in numpy inherited the Ccompier class which had the runtime library directories NotImplemented. Hence the compilers need to define their own runtime library path. I have added that information to the intel/pgi/sun compilers. The rest are either already implemented or I do not know them. I have tested the bug-fix with intel compilers of numpy AND the subsequent installation of scipy (which relies on the fortran compilers). Hence this bug will only occur when linking with the fortran compilers.
Diffstat (limited to 'numpy/distutils/fcompiler/intel.py')
-rw-r--r--numpy/distutils/fcompiler/intel.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/distutils/fcompiler/intel.py b/numpy/distutils/fcompiler/intel.py
index f76174c7a..63436e4ed 100644
--- a/numpy/distutils/fcompiler/intel.py
+++ b/numpy/distutils/fcompiler/intel.py
@@ -14,12 +14,17 @@ def intel_version_match(type):
# Match against the important stuff in the version string
return simple_version_match(start=r'Intel.*?Fortran.*?(?:%s).*?Version' % (type,))
+
class BaseIntelFCompiler(FCompiler):
def update_executables(self):
f = dummy_fortran_file()
self.executables['version_cmd'] = ['<F77>', '-FI', '-V', '-c',
f + '.f', '-o', f + '.o']
+ def runtime_library_dir_option(self, dir):
+ return '-Wl,-rpath="%s"' % dir
+
+
class IntelFCompiler(BaseIntelFCompiler):
compiler_type = 'intel'
@@ -71,6 +76,7 @@ class IntelFCompiler(BaseIntelFCompiler):
opt[idx:idx] = ['-dynamiclib', '-Wl,-undefined,dynamic_lookup']
return opt
+
class IntelItaniumFCompiler(IntelFCompiler):
compiler_type = 'intele'
compiler_aliases = ()
@@ -90,6 +96,7 @@ class IntelItaniumFCompiler(IntelFCompiler):
'ranlib' : ["ranlib"]
}
+
class IntelEM64TFCompiler(IntelFCompiler):
compiler_type = 'intelem'
compiler_aliases = ()
@@ -122,6 +129,7 @@ class IntelEM64TFCompiler(IntelFCompiler):
# Is there no difference in the version string between the above compilers
# and the Visual compilers?
+
class IntelVisualFCompiler(BaseIntelFCompiler):
compiler_type = 'intelv'
description = 'Intel Visual Fortran Compiler for 32-bit apps'
@@ -167,6 +175,10 @@ class IntelVisualFCompiler(BaseIntelFCompiler):
def get_flags_arch(self):
return ["/arch:IA-32", "/QaxSSE3"]
+ def runtime_library_dir_option(self, dir):
+ raise NotImplementedError
+
+
class IntelItaniumVisualFCompiler(IntelVisualFCompiler):
compiler_type = 'intelev'
description = 'Intel Visual Fortran Compiler for Itanium apps'
@@ -186,6 +198,7 @@ class IntelItaniumVisualFCompiler(IntelVisualFCompiler):
'ranlib' : None
}
+
class IntelEM64VisualFCompiler(IntelVisualFCompiler):
compiler_type = 'intelvem'
description = 'Intel Visual Fortran Compiler for 64-bit apps'