diff options
author | Hemmo Nieminen <hemmo.nieminen@iki.fi> | 2017-07-07 11:34:54 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-15 13:44:07 +0200 |
commit | 09a5399d095137d3d302dc885abbf88731a1918b (patch) | |
tree | 6067df3496ecf51b86d59c0768c9489fd37a1531 /mesonbuild/compilers/compilers.py | |
parent | fd653d070d7d498ca8bb8a2430ed128d6239601d (diff) | |
download | meson-09a5399d095137d3d302dc885abbf88731a1918b.zip meson-09a5399d095137d3d302dc885abbf88731a1918b.tar.gz meson-09a5399d095137d3d302dc885abbf88731a1918b.tar.bz2 |
Fix how rpath directories are handled.
Linking a library from a directory below the executable's directory caused
an invalid path to be written in the executable's RPATH.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 9007cc5..116b0d9 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -763,14 +763,10 @@ class Compiler: # directory. This breaks reproducible builds. rel_rpaths = [] for p in rpath_paths: - # p can be an empty string for build_dir (relative path), but - # os.path.relpath() below won't like that. - if p == '': - p = build_dir if p == from_dir: relative = '' # relpath errors out in this case else: - relative = os.path.relpath(p, from_dir) + relative = os.path.relpath(os.path.join(build_dir, p), os.path.join(build_dir, from_dir)) rel_rpaths.append(relative) paths = ':'.join([os.path.join('$ORIGIN', p) for p in rel_rpaths]) if len(paths) < len(install_rpath): |