forked from qt-creator/qt-creator
ProjectExplorer: Improve detection of MIPS variants
Detect also "mips" and "mips64" as mips Change-Id: Ia2259bc4c1144834d20f6bd1c7c91f359e1a67d8 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
516b5793d9
commit
4dd200259f
@@ -469,9 +469,9 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
|
|||||||
} else if (p.startsWith(QLatin1String("arm"))) {
|
} else if (p.startsWith(QLatin1String("arm"))) {
|
||||||
arch = Abi::ArmArchitecture;
|
arch = Abi::ArmArchitecture;
|
||||||
width = 32;
|
width = 32;
|
||||||
} else if (p == QLatin1String("mipsel")) {
|
} else if (p.startsWith(QLatin1String("mips"))) {
|
||||||
arch = Abi::MipsArchitecture;
|
arch = Abi::MipsArchitecture;
|
||||||
width = 32;
|
width = p.endsWith(QLatin1String("64")) ? 64 : 32;
|
||||||
} else if (p == QLatin1String("x86_64") || p == QLatin1String("amd64")) {
|
} else if (p == QLatin1String("x86_64") || p == QLatin1String("amd64")) {
|
||||||
arch = Abi::X86Architecture;
|
arch = Abi::X86Architecture;
|
||||||
width = 64;
|
width = 64;
|
||||||
@@ -1057,6 +1057,14 @@ void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet_data()
|
|||||||
QTest::newRow("mipsel-unknown-linux-android") << int(Abi::MipsArchitecture)
|
QTest::newRow("mipsel-unknown-linux-android") << int(Abi::MipsArchitecture)
|
||||||
<< int(Abi::LinuxOS) << int(Abi::AndroidLinuxFlavor)
|
<< int(Abi::LinuxOS) << int(Abi::AndroidLinuxFlavor)
|
||||||
<< int(Abi::ElfFormat) << 32;
|
<< int(Abi::ElfFormat) << 32;
|
||||||
|
|
||||||
|
QTest::newRow("mips-linux-gnu") << int(Abi::MipsArchitecture)
|
||||||
|
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
|
||||||
|
<< int(Abi::ElfFormat) << 32;
|
||||||
|
|
||||||
|
QTest::newRow("mips64-linux-octeon-gnu") << int(Abi::MipsArchitecture)
|
||||||
|
<< int(Abi::LinuxOS) << int(Abi::GenericLinuxFlavor)
|
||||||
|
<< int(Abi::ElfFormat) << 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet()
|
void ProjectExplorer::ProjectExplorerPlugin::testAbiFromTargetTriplet()
|
||||||
|
|||||||
Reference in New Issue
Block a user