Commit c8989b7a authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Mingw: Enable mingw on linux



Change-Id: I1fd01abd66ffd7cf1328590eaad707dbe52cead5
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 094bc85d
......@@ -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")
......
......@@ -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);
......
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