diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 15442cb04b766048535408d6dcbcb14278e75ba2..2bfa901f45fe0d896c4036e506b8c9d1df7222c4 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -199,7 +199,7 @@ static QList<ProjectExplorer::Abi> guessGccAbi(const QString &m) } else if (p == QLatin1String("mipsel")) { arch = ProjectExplorer::Abi::MipsArchitecture; width = 32; - } else if (p == QLatin1String("x86_64")) { + } else if (p == QLatin1String("x86_64") || p == QLatin1String("amd64")) { arch = ProjectExplorer::Abi::X86Architecture; width = 64; } else if (p == QLatin1String("powerpc")) { @@ -225,7 +225,7 @@ static QList<ProjectExplorer::Abi> guessGccAbi(const QString &m) flavor = ProjectExplorer::Abi::SymbianDeviceFlavor; format = ProjectExplorer::Abi::ElfFormat; width = 32; - } else if (p == QLatin1String("mingw32") || p == QLatin1String("win32")) { + } else if (p == QLatin1String("mingw32") || p == QLatin1String("win32") || p == QLatin1String("mingw32msvc")) { arch = ProjectExplorer::Abi::X86Architecture; os = ProjectExplorer::Abi::WindowsOS; flavor = ProjectExplorer::Abi::WindowsMSysFlavor; @@ -888,7 +888,11 @@ Utils::FileName MingwToolChain::mkspec() const QString MingwToolChain::makeCommand() const { +#ifdef Q_OS_WIN return QLatin1String("mingw32-make.exe"); +#else + return QLatin1String("make"); +#endif } ToolChain *MingwToolChain::clone() const @@ -1106,6 +1110,13 @@ void ProjectExplorerPlugin::testGccAbiGuessing_data() QTest::newRow("Mingw 2") << QString::fromLatin1("mingw32") << (QStringList() << QLatin1String("x86-windows-msys-pe-32bit")); + QTest::newRow("Cross Mingw 1") + << QString::fromLatin1("amd64-mingw32msvc") + << (QStringList() << QLatin1String("x86-windows-msys-pe-64bit") + << QLatin1String("x86-windows-msys-pe-32bit")); + QTest::newRow("Cross Mingw 2") + << QString::fromLatin1("i586-mingw32msvc") + << (QStringList() << QLatin1String("x86-windows-msys-pe-32bit")); QTest::newRow("Clang 1: windows") << QString::fromLatin1("x86_64-pc-win32") << (QStringList() << QLatin1String("x86-windows-msys-pe-64bit") diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index a65fdd3458ab6391919072a9e07eabdd5416ee00..474834bb46ec1e97f22a94f321c6519b26878f40 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -313,12 +313,14 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er #ifdef Q_OS_WIN addAutoReleasedObject(new WinDebugInterface); - addAutoReleasedObject(new Internal::MingwToolChainFactory); addAutoReleasedObject(new Internal::MsvcToolChainFactory); addAutoReleasedObject(new Internal::WinCEToolChainFactory); #else addAutoReleasedObject(new Internal::GccToolChainFactory); addAutoReleasedObject(new Internal::LinuxIccToolChainFactory); +#endif +#ifndef Q_OS_MAC + addAutoReleasedObject(new Internal::MingwToolChainFactory); // Mingw offers cross-compiling to windows #endif addAutoReleasedObject(new Internal::ClangToolChainFactory);