Commit f2227af7 authored by Fawzi Mohamed's avatar Fawzi Mohamed
Browse files

gcctoolchain: ensure that arch is passed just once



the first architecture is kept, and used.

Change-Id: I30d0f1f98b0ad53c2133aa9b7da14c86f21de25c
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 080bd0df
...@@ -374,8 +374,10 @@ QByteArray GccToolChain::predefinedMacros(const QStringList &cxxflags) const ...@@ -374,8 +374,10 @@ QByteArray GccToolChain::predefinedMacros(const QStringList &cxxflags) const
QStringList arguments = gccPredefinedMacrosOptions(); QStringList arguments = gccPredefinedMacrosOptions();
for (int iArg = 0; iArg < allCxxflags.length(); ++iArg) { for (int iArg = 0; iArg < allCxxflags.length(); ++iArg) {
const QString &a = allCxxflags.at(iArg); const QString &a = allCxxflags.at(iArg);
if (a == QLatin1String("-arch") || a == QLatin1String("--sysroot") if (a == QLatin1String("-arch")) {
|| a == QLatin1String("-isysroot")) { if (++iArg < allCxxflags.length() && !arguments.contains(a))
arguments << a << allCxxflags.at(iArg);
} else if (a == QLatin1String("--sysroot") || a == QLatin1String("-isysroot")) {
if (++iArg < allCxxflags.length()) if (++iArg < allCxxflags.length())
arguments << a << allCxxflags.at(iArg); arguments << a << allCxxflags.at(iArg);
} else if (a == QLatin1String("-m128bit-long-double") || a == QLatin1String("-m32") } else if (a == QLatin1String("-m128bit-long-double") || a == QLatin1String("-m32")
......
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