Commit f257f19b authored by con's avatar con
Browse files

Some missing defines for Symbian tool chains.

Reviewed-by: dt
parent 3452b421
......@@ -51,6 +51,17 @@ ToolChain::ToolChainType GCCEToolChain::type() const
return ToolChain::GCCE;
}
QByteArray GCCEToolChain::predefinedMacros()
{
if (m_predefinedMacros.isEmpty()) {
ProjectExplorer::GccToolChain::predefinedMacros();
m_predefinedMacros += "\n"
"#define __GCCE__\n"
"#define __SYMBIAN32__\n";
}
return m_predefinedMacros;
}
QList<HeaderPath> GCCEToolChain::systemHeaderPaths()
{
if (m_systemHeaderPaths.isEmpty()) {
......
......@@ -41,6 +41,7 @@ class GCCEToolChain : public ProjectExplorer::GccToolChain
{
public:
GCCEToolChain(S60Devices::Device device, const QString &gcceCommand);
QByteArray predefinedMacros();
QList<ProjectExplorer::HeaderPath> systemHeaderPaths();
void addToEnvironment(ProjectExplorer::Environment &env);
ProjectExplorer::ToolChain::ToolChainType type() const;
......
......@@ -77,7 +77,7 @@ QByteArray RVCTToolChain::predefinedMacros()
{
// see http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0205f/Babbacdb.html
updateVersion();
QByteArray ba = QString::fromLocal8Bit(
QByteArray ba = QString::fromLatin1(
"#define __arm__arm__\n"
"#define __ARMCC_VERSION %1%2%3%4\n"
"#define __ARRAY_OPERATORS\n"
......@@ -93,10 +93,11 @@ QByteArray RVCTToolChain::predefinedMacros()
"#define __TARGET_FEATURE_HALFWORD\n"
"#define __TARGET_FEATURE_THUMB\n"
"#define _WCHAR_T\n"
"#define __SYMBIAN32__\n"
).arg(m_major, 1, 10, QLatin1Char('0'))
.arg(m_minor, 1, 10, QLatin1Char('0'))
.arg("0")
.arg(m_build, 3, 10, QLatin1Char('0')).toLocal8Bit();
.arg(m_build, 3, 10, QLatin1Char('0')).toLatin1();
return ba;
}
......
......@@ -29,6 +29,8 @@
#include "winscwtoolchain.h"
#include <QtCore/QByteArray>
#include <QtCore/QString>
#include <QtDebug>
using namespace ProjectExplorer;
......@@ -50,8 +52,7 @@ ToolChain::ToolChainType WINSCWToolChain::type() const
QByteArray WINSCWToolChain::predefinedMacros()
{
// TODO
return m_predefinedMacros;
return QByteArray("#define __SYMBIAN32__\n");
}
QList<HeaderPath> WINSCWToolChain::systemHeaderPaths()
......@@ -67,10 +68,8 @@ QList<HeaderPath> WINSCWToolChain::systemHeaderPaths()
QStringList WINSCWToolChain::systemIncludes() const
{
if (m_carbidePath.isEmpty()) {
qDebug() << "no carbide path set";
ProjectExplorer::Environment env = ProjectExplorer::Environment::systemEnvironment();
QString symIncludesValue = env.value("MWCSYM2INCLUDES");
qDebug() << "includes:" << symIncludesValue.split(";");
if (!symIncludesValue.isEmpty())
return symIncludesValue.split(";");
} else {
......
......@@ -57,7 +57,6 @@ private:
QString m_deviceId;
QString m_deviceName;
QString m_deviceRoot;
QByteArray m_predefinedMacros;
QList<ProjectExplorer::HeaderPath> m_systemHeaderPaths;
};
......
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