Add $ORIGIN/../lib to RPATH

This commit is contained in:
Valentin Niess
2023-02-15 10:43:43 +01:00
parent db5d91e0dd
commit 818fe273c1

View File

@@ -98,7 +98,7 @@ def patch_binary(path, libdir, recursive=True):
rpath = '\'' + system((PATCHELF, '--print-rpath', path)) + '\''
relpath = os.path.relpath(libdir, os.path.dirname(path))
relpath = '' if relpath == '.' else '/' + relpath
expected = '\'$ORIGIN' + relpath + '\''
expected = '\'$ORIGIN' + relpath + ':$ORIGIN/../lib\''
if rpath != expected:
system((PATCHELF, '--set-rpath', expected, path))