summaryrefslogtreecommitdiff
path: root/numpy/distutils/fcompiler
diff options
context:
space:
mode:
authorEGuesnet <51407514+EGuesnet@users.noreply.github.com>2020-07-08 02:35:16 +0200
committerGitHub <noreply@github.com>2020-07-07 18:35:16 -0600
commit084c1dc7524016a59248b811270e8e4d210b7c1d (patch)
tree4c27adc1c086f34866ba2bb5003d2ef2c1bf472f /numpy/distutils/fcompiler
parent3e8a54175b5b39700ddff4729f9764a5f789a445 (diff)
downloadnumpy-084c1dc7524016a59248b811270e8e4d210b7c1d.tar.gz
BLD, ENH: Add RPATH support for AIX (#16710)
* ENH: Add RPATH support for AIX * ENH: Rewrite function returning RPATH * MAINT: Use f-strings for clarity. Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
Diffstat (limited to 'numpy/distutils/fcompiler')
-rw-r--r--numpy/distutils/fcompiler/gnu.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py
index 23d905393..caa08549e 100644
--- a/numpy/distutils/fcompiler/gnu.py
+++ b/numpy/distutils/fcompiler/gnu.py
@@ -253,15 +253,20 @@ class GnuFCompiler(FCompiler):
return []
def runtime_library_dir_option(self, dir):
- if sys.platform[:3] == 'aix' or sys.platform == 'win32':
- # Linux/Solaris/Unix support RPATH, Windows and AIX do not
+ if sys.platform == 'win32':
+ # Linux/Solaris/Unix support RPATH, Windows does not
raise NotImplementedError
# TODO: could use -Xlinker here, if it's supported
assert "," not in dir
- sep = ',' if sys.platform == 'darwin' else '='
- return '-Wl,-rpath%s%s' % (sep, dir)
+ if sys.platform == 'darwin':
+ return f'-Wl,-rpath,{dir}'
+ elif sys.platform[:3] == 'aix':
+ # AIX RPATH is called LIBPATH
+ return f'-Wl,-blibpath:{dir}'
+ else:
+ return f'-Wl,-rpath={dir}'
class Gnu95FCompiler(GnuFCompiler):