Commit 35572c46 authored by ck's avatar ck
Browse files

Maemo: Fix toolchain's gcc path.

Reviewed-by: kh1
parent 67c421f0
......@@ -118,7 +118,9 @@ MaemoManager::isValidMaemoQtVersion(const Qt4ProjectManager::QtVersion *version)
ProjectExplorer::ToolChain*
MaemoManager::maemoToolChain(const QtVersion *version) const
{
return new MaemoToolChain(version);
QString targetRoot = QDir::cleanPath(version->qmakeCommand());
targetRoot.remove(QLatin1String("/bin/qmake" EXEC_SUFFIX));
return new MaemoToolChain(targetRoot);
}
void
......
......@@ -36,19 +36,14 @@
using namespace ProjectExplorer;
using namespace Qt4ProjectManager::Internal;
namespace {
const char *GCC_MAEMO_COMMAND = "arm-none-linux-gnueabi-gcc" EXEC_SUFFIX;
}
MaemoToolChain::MaemoToolChain(const Qt4ProjectManager::QtVersion *version)
: GccToolChain(QLatin1String(GCC_MAEMO_COMMAND))
MaemoToolChain::MaemoToolChain(const QString &targetRoot)
: GccToolChain(targetRoot % QLatin1String("/bin/gcc"))
, m_maddeInitialized(false)
, m_sysrootInitialized(false)
, m_simulatorInitialized(false)
, m_toolchainInitialized(false)
, m_targetRoot(targetRoot)
{
QString qmake = QDir::cleanPath(version->qmakeCommand());
m_targetRoot = qmake.remove(QLatin1String("/bin/qmake" EXEC_SUFFIX));
}
MaemoToolChain::~MaemoToolChain()
......@@ -60,11 +55,6 @@ ToolChain::ToolChainType MaemoToolChain::type() const
return ToolChain::GCC_MAEMO;
}
QList<HeaderPath> MaemoToolChain::systemHeaderPaths()
{
return GccToolChain::systemHeaderPaths();
}
void MaemoToolChain::addToEnvironment(ProjectExplorer::Environment &env)
{
env.prependOrSetPath(QDir::toNativeSeparators(QString("%1/bin")
......
......@@ -45,10 +45,9 @@ namespace Qt4ProjectManager {
class MaemoToolChain : public ProjectExplorer::GccToolChain
{
public:
MaemoToolChain(const Qt4ProjectManager::QtVersion *version);
MaemoToolChain(const QString &targetRoot);
virtual ~MaemoToolChain();
QList<ProjectExplorer::HeaderPath> systemHeaderPaths();
void addToEnvironment(ProjectExplorer::Environment &env);
ProjectExplorer::ToolChain::ToolChainType type() const;
QString makeCommand() const;
......@@ -77,10 +76,10 @@ private:
mutable QString m_simulatorRoot;
mutable bool m_simulatorInitialized;
QString m_targetRoot;
mutable QString m_toolchainRoot;
mutable bool m_toolchainInitialized;
const QString m_targetRoot;
};
} // namespace Internal
......
Supports Markdown
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