aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers.py
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2020-12-20 13:38:53 -0800
committerJussi Pakkanen <jpakkane@gmail.com>2020-12-22 20:21:31 +0000
commitfdfc239cda44f175f63cb9728015045daae7a991 (patch)
tree1679c393bdaf7ddf8891377abf70dacf4887c85d /mesonbuild/linkers.py
parent8a11cf357eaae46fd7efbb9993c0bb00e9529a13 (diff)
downloadmeson-fdfc239cda44f175f63cb9728015045daae7a991.zip
meson-fdfc239cda44f175f63cb9728015045daae7a991.tar.gz
meson-fdfc239cda44f175f63cb9728015045daae7a991.tar.bz2
linkers: add rpath_dirs_to_remove support to SolarisDynamicLinker
Applies the changes made to GnuLikeDynamicLinkerMixin by commit d7235c5905fa98207d90f3ad34bf590493498d5b to SolarisDynamicLinker This makes test_build_rpath pass with the Solaris linker, where before this change it failed with: New rpath must not be longer than the old one. Old: $ORIGIN/sub:/foo/bar New: /baz:$ORIGIN/sub:/foo/bar FAILED: meson-install Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'mesonbuild/linkers.py')
-rw-r--r--mesonbuild/linkers.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index e74457b..0f05fef 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -1260,8 +1260,13 @@ class SolarisDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker):
return ([], set())
processed_rpaths = prepare_rpaths(rpath_paths, build_dir, from_dir)
all_paths = mesonlib.OrderedSet([os.path.join('$ORIGIN', p) for p in processed_rpaths])
+ rpath_dirs_to_remove = set()
+ for p in all_paths:
+ rpath_dirs_to_remove.add(p.encode('utf8'))
if build_rpath != '':
all_paths.add(build_rpath)
+ for p in build_rpath.split(':'):
+ rpath_dirs_to_remove.add(p.encode('utf8'))
# In order to avoid relinking for RPATH removal, the binary needs to contain just
# enough space in the ELF header to hold the final installation RPATH.
@@ -1272,7 +1277,7 @@ class SolarisDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker):
paths = padding
else:
paths = paths + ':' + padding
- return (self._apply_prefix('-rpath,{}'.format(paths)), set())
+ return (self._apply_prefix('-rpath,{}'.format(paths)), rpath_dirs_to_remove)
def get_soname_args(self, env: 'Environment', prefix: str, shlib_name: str,
suffix: str, soversion: str, darwin_versions: T.Tuple[str, str],