mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-04-12 21:25:04 -05:00
Properly set rpath in existing files
This commit is contained in:
@@ -820,7 +820,21 @@ namespace linuxdeploy {
|
||||
if (!d->deployElfDependencies(executable))
|
||||
return false;
|
||||
|
||||
d->setElfRPathOperations[executable] = "$ORIGIN/../lib";
|
||||
const auto systemElfClass = elf::ElfFile::getSystemElfClass();
|
||||
const auto elfClass = elf::ElfFile(executable).getElfClass();
|
||||
|
||||
std::string libSuffix = "";
|
||||
|
||||
if (systemElfClass != elfClass) {
|
||||
if (elfClass == ELFCLASS32)
|
||||
libSuffix = "32";
|
||||
else
|
||||
libSuffix = "64";
|
||||
}
|
||||
|
||||
std::string rpath = "$ORIGIN/../lib" + libSuffix;
|
||||
|
||||
d->setElfRPathOperations[executable] = rpath;
|
||||
}
|
||||
|
||||
for (const auto& sharedLibrary : listSharedLibraries()) {
|
||||
|
||||
Reference in New Issue
Block a user