summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-04-24 22:11:34 -0400
committerCharles Harris <charlesr.harris@gmail.com>2015-04-24 22:11:34 -0400
commita8b1c0c6d10e1939d9001a52a962ecd6ef06500c (patch)
tree88cc2cd665ce9fbff145ea6db018d6b5a272be4e /numpy/distutils/fcompiler
parent77c20d88ddb50c3d63ebf49324152ca6f07e0ce2 (diff)
parent525f0cd85fa270ee0fb843a8cfdd21dfe98238cd (diff)
downloadnumpy-a8b1c0c6d10e1939d9001a52a962ecd6ef06500c.tar.gz
Merge pull request #5597 from zerothi/ENH-distutils
BLD, ENH: Reading of extra flags from site.cfg to extend flexibility
Diffstat (limited to 'numpy/distutils/fcompiler')
-rw-r--r--numpy/distutils/fcompiler/intel.py13
-rw-r--r--numpy/distutils/fcompiler/pg.py3
-rw-r--r--numpy/distutils/fcompiler/sun.py3
3 files changed, 19 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'
diff --git a/numpy/distutils/fcompiler/pg.py b/numpy/distutils/fcompiler/pg.py
index f3f5ea22b..ee357c6d0 100644
--- a/numpy/distutils/fcompiler/pg.py
+++ b/numpy/distutils/fcompiler/pg.py
@@ -51,6 +51,9 @@ class PGroupFCompiler(FCompiler):
def get_flags_linker_so(self):
return ["-dynamic", '-undefined', 'dynamic_lookup']
+ def runtime_library_dir_option(self, dir):
+ return '-R"%s"' % dir
+
if __name__ == '__main__':
from distutils import log
log.set_verbosity(2)
diff --git a/numpy/distutils/fcompiler/sun.py b/numpy/distutils/fcompiler/sun.py
index 0955f14a1..76ce1cabc 100644
--- a/numpy/distutils/fcompiler/sun.py
+++ b/numpy/distutils/fcompiler/sun.py
@@ -43,6 +43,9 @@ class SunFCompiler(FCompiler):
opt.extend(['fsu', 'sunmath', 'mvec'])
return opt
+ def runtime_library_dir_option(self, dir):
+ return '-R"%s"' % dir
+
if __name__ == '__main__':
from distutils import log
log.set_verbosity(2)