Tolerate symlinks during RPATH ordering (#13429)
On Arch Linux, /lib and /lib64 are symlinks to /usr/lib. When ordering runtime library search paths, we must not consider these to be distinct directories. Before considering conflicts between two directories, check that they do not have the same 'realpath'. Inspired-by: Myles English <mylesenglish@gmail.com>
This commit is contained in:
parent
a06e49cf10
commit
f99cc9c389
|
@ -72,7 +72,10 @@ public:
|
|||
{
|
||||
// Check if this directory conflicts with the entry.
|
||||
std::string const& dir = this->OD->OriginalDirectories[i];
|
||||
if(dir != this->Directory && this->FindConflict(dir))
|
||||
if(dir != this->Directory &&
|
||||
cmSystemTools::GetRealPath(dir) !=
|
||||
cmSystemTools::GetRealPath(this->Directory) &&
|
||||
this->FindConflict(dir))
|
||||
{
|
||||
// The library will be found in this directory but this is not
|
||||
// the directory named for it. Add an entry to make sure the
|
||||
|
@ -90,7 +93,10 @@ public:
|
|||
{
|
||||
// Check if this directory conflicts with the entry.
|
||||
std::string const& dir = this->OD->OriginalDirectories[i];
|
||||
if(dir != this->Directory && this->FindConflict(dir))
|
||||
if(dir != this->Directory &&
|
||||
cmSystemTools::GetRealPath(dir) !=
|
||||
cmSystemTools::GetRealPath(this->Directory) &&
|
||||
this->FindConflict(dir))
|
||||
{
|
||||
// The library will be found in this directory but it is
|
||||
// supposed to be found in an implicit search directory.
|
||||
|
|
Loading…
Reference in New Issue