Commit ec6fc83c authored by kh1's avatar kh1
Browse files

Make sure we can compile the debugging help for maemo.

This boils down to the same problem as other calls to qmake, if we don't
pass the target mode, qmake will prepend the current platform as target.
Reviewed-by: dt
parent 7d76940a
...@@ -130,15 +130,6 @@ QString DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(const QStrin ...@@ -130,15 +130,6 @@ QString DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(const QStrin
return QString(); return QString();
} }
QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &qmakePath, const QString &make, const Environment &env)
{
QString errorMessage;
const QString directory = copyDebuggingHelperLibrary(qtInstallDataDir(qmakePath), &errorMessage);
if (directory.isEmpty())
return errorMessage;
return buildDebuggingHelperLibrary(directory, make, qmakePath, QString(), env);
}
// Copy helper source files to a target directory, replacing older files. // Copy helper source files to a target directory, replacing older files.
static bool copyDebuggingHelperFiles(const QStringList &files, static bool copyDebuggingHelperFiles(const QStringList &files,
const QString &targetDirectory, const QString &targetDirectory,
...@@ -192,7 +183,9 @@ QString DebuggingHelperLibrary::copyDebuggingHelperLibrary(const QString &qtInst ...@@ -192,7 +183,9 @@ QString DebuggingHelperLibrary::copyDebuggingHelperLibrary(const QString &qtInst
return QString(); return QString();
} }
QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &directory, const QString &makeCommand, const QString &qmakeCommand, const QString &mkspec, const Environment &env) QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &directory, const QString &makeCommand,
const QString &qmakeCommand, const QString &mkspec,
const Environment &env, const QString &targetMode)
{ {
QString output; QString output;
const QChar newline = QLatin1Char('\n'); const QChar newline = QLatin1Char('\n');
...@@ -222,7 +215,7 @@ QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &direc ...@@ -222,7 +215,7 @@ QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &direc
output += QCoreApplication::translate("ProjectExplorer::DebuggingHelperLibrary", "Running %1 ...\n").arg(qmakeCommand); output += QCoreApplication::translate("ProjectExplorer::DebuggingHelperLibrary", "Running %1 ...\n").arg(qmakeCommand);
QStringList makeArgs; QStringList makeArgs;
makeArgs << QLatin1String("-spec")<< (mkspec.isEmpty() ? QString(QLatin1String("default")) : mkspec) << QLatin1String("gdbmacros.pro"); makeArgs << targetMode << QLatin1String("-spec") << (mkspec.isEmpty() ? QString(QLatin1String("default")) : mkspec) << QLatin1String("gdbmacros.pro");
proc.start(qmakeCommand, makeArgs); proc.start(qmakeCommand, makeArgs);
proc.waitForFinished(); proc.waitForFinished();
......
...@@ -52,8 +52,8 @@ public: ...@@ -52,8 +52,8 @@ public:
static QStringList debuggingHelperLibraryLocationsByInstallData(const QString &qtInstallData); static QStringList debuggingHelperLibraryLocationsByInstallData(const QString &qtInstallData);
// Build the helpers and return the output log/errormessage. // Build the helpers and return the output log/errormessage.
static QString buildDebuggingHelperLibrary(const QString &qmakePath, const QString &make, const Environment &env); static QString buildDebuggingHelperLibrary(const QString &directory, const QString &makeCommand,
static QString buildDebuggingHelperLibrary(const QString &directory, const QString &makeCommand, const QString &qmakeCommand, const QString &mkspec, const Environment &env); const QString &qmakeCommand, const QString &mkspec, const Environment &env, const QString &targetMode);
// Copy the source files to a target location and return the chosen target location. // Copy the source files to a target location and return the chosen target location.
static QString copyDebuggingHelperLibrary(const QString &qtInstallData, QString *errorMessage); static QString copyDebuggingHelperLibrary(const QString &qtInstallData, QString *errorMessage);
......
...@@ -1657,8 +1657,11 @@ QString QtVersion::buildDebuggingHelperLibrary() ...@@ -1657,8 +1657,11 @@ QString QtVersion::buildDebuggingHelperLibrary()
tc->addToEnvironment(env); tc->addToEnvironment(env);
QString output; QString output;
QString directory = DebuggingHelperLibrary::copyDebuggingHelperLibrary(qtInstallData, &output); QString directory = DebuggingHelperLibrary::copyDebuggingHelperLibrary(qtInstallData, &output);
if (!directory.isEmpty()) if (!directory.isEmpty()) {
output += DebuggingHelperLibrary::buildDebuggingHelperLibrary(directory, tc->makeCommand(), qmakeCommand(), mkspec(), env); output += DebuggingHelperLibrary::buildDebuggingHelperLibrary(directory, tc->makeCommand(),
qmakeCommand(), mkspec(), env,
(tc->type() == ToolChain::GCC_MAEMO ? QLatin1String("-unix") : QLatin1String("")));
}
m_hasDebuggingHelper = !debuggingHelperLibrary().isEmpty(); m_hasDebuggingHelper = !debuggingHelperLibrary().isEmpty();
return output; return output;
} }
......
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