From 9d5e38dbbbee94c829a85ea3803390fa6036bbe5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 2 Apr 2019 13:49:34 +0200 Subject: [PATCH] ProjectExplorer: Do not set up a 64-bit mingw as a 32-bit toolchain The mingw toolchain is typically shipped explicitly as a 32-bit or 64- bit package, alongside matching libraries. Therefore, it makes little sense to set up a 64-bit mingw compiler as a 32-bit toolchain, even though it can create 32-bit objects. Task-number: QTCREATORBUG-22160 Change-Id: I9437801741b146785fecb0c0dd4b1db21ef94918 Reviewed-by: Joerg Bornemann --- src/plugins/projectexplorer/gcctoolchain.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index c9c28846f6a..7a904a4bd16 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -203,7 +203,8 @@ static QList guessGccAbi(const QString &m, const ProjectExplorer::Macros &m abiList << Abi(arch, os, flavor, format, width == 64 ? 32 : 64); } else if (arch == Abi::X86Architecture && (width == 0 || width == 64)) { abiList << Abi(arch, os, flavor, format, 64); - abiList << Abi(arch, os, flavor, format, 32); + if (width != 64 || !m.contains("mingw")) + abiList << Abi(arch, os, flavor, format, 32); } else { abiList << Abi(arch, os, flavor, format, width); }