From c65ba85f8dfe12dc1fe3c7947497363bd5942fa8 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 8 Apr 2011 16:33:59 +0200 Subject: [PATCH] Gcc: Detect arm gccs on mac properly ... and add a unit test. --- src/plugins/projectexplorer/gcctoolchain.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 9efa4a849fb..ac5398f2e11 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -236,7 +236,7 @@ static QList guessGccAbi(const QString &m) if (unknownCount == parts.count()) return abiList; - if (os == Abi::MacOS) { + if (os == Abi::MacOS && arch != Abi::ArmArchitecture) { // Apple does PPC and x86! abiList << ProjectExplorer::Abi(arch, os, flavor, format, width); abiList << ProjectExplorer::Abi(arch, os, flavor, format, width == 64 ? 32 : 64); @@ -870,6 +870,9 @@ void ProjectExplorerPlugin::testGccAbiGuessing_data() << QLatin1String("x86-macos-generic-mach_o-64bit") << QLatin1String("ppc-macos-generic-mach_o-32bit") << QLatin1String("ppc-macos-generic-mach_o-64bit")); + QTest::newRow("Mac IOS") + << QString::fromLatin1("arm-apple-darwin9") + << (QStringList() << QLatin1String("arm-macos-generic-mach_o-32bit")); QTest::newRow("Intel 1") << QString::fromLatin1("86_64 x86_64 GNU/Linux") << (QStringList() << QLatin1String("x86-linux-generic-elf-64bit")