Commit 08423ddd authored by Tobias Hunger's avatar Tobias Hunger

Abi: Make *-linux-generic-* compatible with *-linux-*

parent 38326a28
......@@ -351,11 +351,20 @@ bool Abi::operator == (const Abi &other) const
bool Abi::isCompatibleWith(const Abi &other) const
{
return (architecture() == other.architecture() || other.architecture() == Abi::UnknownArchitecture)
&& (os() == other.os() || other.os() == Abi::UnknownOS)
&& (osFlavor() == other.osFlavor() || other.osFlavor() == Abi::UnknownFlavor)
&& (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UnknownFormat)
&& ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0);
bool isCompat = (architecture() == other.architecture() || other.architecture() == Abi::UnknownArchitecture)
&& (os() == other.os() || other.os() == Abi::UnknownOS)
&& (osFlavor() == other.osFlavor() || other.osFlavor() == Abi::UnknownFlavor)
&& (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UnknownFormat)
&& ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0);
// *-linux-generic-* is compatible with *-linux-*:
if (!isCompat && architecture() == other.architecture()
&& os() == other.os()
&& osFlavor() == GenericLinuxFlavor
&& other.os() == LinuxOS
&& binaryFormat() == other.binaryFormat()
&& wordWidth() == other.wordWidth())
isCompat = true;
return isCompat;
}
bool Abi::isValid() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment