Commit 4dd20025 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

ProjectExplorer: Improve detection of MIPS variants



Detect also "mips" and "mips64" as mips

Change-Id: Ia2259bc4c1144834d20f6bd1c7c91f359e1a67d8
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 516b5793
...@@ -469,9 +469,9 @@ Abi Abi::abiFromTargetTriplet(const QString &triple) ...@@ -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() ...@@ -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()
......
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