when amending rpath don't add empty rpath entries

This commit is contained in:
Jörg Thalheim
2021-08-28 08:29:40 +02:00
parent 354dd23ed4
commit 52a5bb061a

View File

@@ -1459,12 +1459,14 @@ void ElfFile<ElfFileParamNames>::modifyRPath(RPathOp op,
if (!rpath) {
debug("no RPATH to shrink\n");
return;
}
;}
newRPath = shrinkRPath(rpath, neededLibs, allowedRpathPrefixes);
break;
}
case rpAdd: {
newRPath = std::string(rpath ? rpath : "") + ":" + newRPath;
auto temp = std::string(rpath ? rpath : "");
appendRPath(temp, newRPath);
newRPath = temp;
break;
}
case rpSet: { break; } /* new rpath was provied as input to this function */