From: Michael Olbrich Date: Mon, 18 Mar 2019 13:04:32 +0100 Subject: [PATCH] HACK: don't loose the rpath for host packages Needed by ptxdist to run tools in sysroot-host Signed-off-by: Michael Olbrich --- mesonbuild/backend/backends.py | 6 +++++- mesonbuild/minstall.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 085589074d52..30b180c07457 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -1077,9 +1077,13 @@ class Backend: # Done separately because of strip/aliases/rpath if outdirs[0] is not False: mappings = t.get_link_deps_mapping(d.prefix, self.environment) + if not t.install_rpath and not self.environment.is_cross_build(): + install_rpath = None + else: + install_rpath = t.install_rpath i = TargetInstallData(self.get_target_filename(t), outdirs[0], t.get_aliases(), should_strip, mappings, - t.install_rpath, install_mode) + install_rpath, install_mode) d.targets.append(i) # On toolchains/platforms that use an import library for # linking (separate from the shared library with all the diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py index ed82c3791a72..e3d5c96eb215 100644 --- a/mesonbuild/minstall.py +++ b/mesonbuild/minstall.py @@ -486,7 +486,7 @@ class Installer: print("Symlink creation does not work on this platform. " "Skipping all symlinking.") printed_symlink_error = True - if os.path.isfile(outname): + if os.path.isfile(outname) and install_rpath is not None: try: depfixer.fix_rpath(outname, install_rpath, final_path, install_name_mappings, verbose=False)