Accept --gcctoolchain= argument to GCC-based compilers

Change-Id: I12c9d2e489b210433e9270de22783bbdc5c9544e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2016-11-24 14:26:51 +01:00
parent 391284f393
commit 4a02611cd5

View File

@@ -365,7 +365,9 @@ QByteArray GccToolChain::predefinedMacros(const QStringList &cxxflags) const
QStringList arguments = gccPredefinedMacrosOptions();
for (int iArg = 0; iArg < allCxxflags.length(); ++iArg) {
const QString &a = allCxxflags.at(iArg);
if (a == QLatin1String("-arch")) {
if (a.startsWith("--gcc-toolchain=")) {
arguments << a;
} else if (a == QLatin1String("-arch")) {
if (++iArg < allCxxflags.length() && !arguments.contains(a))
arguments << a << allCxxflags.at(iArg);
} else if (a == QLatin1String("--sysroot") || a == QLatin1String("-isysroot")
@@ -539,7 +541,7 @@ QList<HeaderPath> GccToolChain::systemHeaderPaths(const QStringList &cxxflags, c
QStringList flags;
flags << m_platformCodeGenFlags << cxxflags;
foreach (const QString &a, flags) {
if (a.startsWith(QLatin1String("-stdlib=")))
if (a.startsWith(QLatin1String("-stdlib=")) || a.startsWith("--gcctoolchain="))
arguments << a;
}