ABI: Make "linux-generic" ABIs compatible with "linux-*"

This is for the benefit of people using e.g. meego tool chains to
build their own Qt versions and work with them in the desktop
target.

All the specialized targets filter the tool chains again, so
this should be ok to do.

Task-number: QTCREATORBUG-5960
Change-Id: If872d8a6ba75985f23f36646bb89e1651ce82f80
Reviewed-on: http://codereview.qt-project.org/4521
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2011-09-09 09:51:58 +00:00
parent f05683ac7e
commit e7c118c709

View File

@@ -466,13 +466,16 @@ bool Abi::isCompatibleWith(const Abi &other) const
&& (osFlavor() == other.osFlavor() || other.osFlavor() == Abi::UnknownFlavor) && (osFlavor() == other.osFlavor() || other.osFlavor() == Abi::UnknownFlavor)
&& (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UnknownFormat) && (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UnknownFormat)
&& ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0); && ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0);
// *-linux-generic-* is compatible with *-linux-*: // *-linux-generic-* is compatible with *-linux-* (both ways): This is for the benefit of
if (!isCompat && architecture() == other.architecture() // people building Qt themselves using e.g. a meego toolchain.
&& os() == other.os() //
&& osFlavor() == GenericLinuxFlavor // We leave it to the specific targets to catch filter out the tool chains that do not
&& other.os() == LinuxOS // work for them.
&& binaryFormat() == other.binaryFormat() if (!isCompat && (architecture() == other.architecture() || other.architecture() == Abi::UnknownArchitecture)
&& wordWidth() == other.wordWidth()) && (os() == other.os() == LinuxOS)
&& (osFlavor() == GenericLinuxFlavor || other.osFlavor() == GenericLinuxFlavor)
&& (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UnknownFormat)
&& ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0))
isCompat = true; isCompat = true;
return isCompat; return isCompat;
} }