summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-03-31 18:47:56 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-04-01 09:10:26 +0200
commit0e6ee136c91432d4ceeeda64e5a5fa88231398d4 (patch)
tree6060e002af2900007895f6efa757989dd4c190c9 /tools
parent418869d9158ea5cd998ba30778b0b7173b48161b (diff)
parent17294c5e4d15d5776f6e414b03671a4a9ed4993d (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: src/testlib/qtestblacklist.cpp src/widgets/accessible/qaccessiblewidgets.cpp Change-Id: If032adb9296428f62384ed835dbf41ee7a0b886c
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp26
-rw-r--r--tools/configure/environment.cpp12
-rw-r--r--tools/configure/environment.h1
3 files changed, 36 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 4f78660db4..04909525d1 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -305,6 +305,14 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "LTCG" ] = "no";
dictionary[ "NATIVE_GESTURES" ] = "yes";
dictionary[ "MSVC_MP" ] = "no";
+
+ if (dictionary["QMAKESPEC"] == QString("win32-g++")) {
+ const QString zero = QStringLiteral("0");
+ const QStringList parts = Environment::gccVersion().split(QLatin1Char('.'));
+ dictionary["QT_GCC_MAJOR_VERSION"] = parts.value(0, zero);
+ dictionary["QT_GCC_MINOR_VERSION"] = parts.value(1, zero);
+ dictionary["QT_GCC_PATCH_VERSION"] = parts.value(2, zero);
+ }
}
Configure::~Configure()
@@ -2029,16 +2037,18 @@ bool Configure::displayHelp()
// Locate a file and return its containing directory.
QString Configure::locateFile(const QString &fileName) const
{
+ const QString mkspec = dictionary.contains(QStringLiteral("XQMAKESPEC"))
+ ? dictionary[QStringLiteral("XQMAKESPEC")] : dictionary[QStringLiteral("QMAKESPEC")];
const QString file = fileName.toLower();
QStringList pathList;
if (file.endsWith(".h")) {
static const QStringList headerPaths =
- Environment::headerPaths(Environment::compilerFromQMakeSpec(dictionary[QStringLiteral("QMAKESPEC")]));
+ Environment::headerPaths(Environment::compilerFromQMakeSpec(mkspec));
pathList = qmakeIncludes;
pathList += headerPaths;
} else if (file.endsWith(".lib") || file.endsWith(".a")) {
static const QStringList libPaths =
- Environment::libraryPaths(Environment::compilerFromQMakeSpec(dictionary[QStringLiteral("QMAKESPEC")]));
+ Environment::libraryPaths(Environment::compilerFromQMakeSpec(mkspec));
pathList = libPaths;
} else {
// Fallback for .exe and .dll (latter are not covered by QStandardPaths).
@@ -3466,6 +3476,12 @@ void Configure::generateQConfigPri()
if (dictionary[ "SHARED" ] == "no")
configStream << "QT_DEFAULT_QPA_PLUGIN = q" << qpaPlatformName() << endl;
+ if (!dictionary["QT_GCC_MAJOR_VERSION"].isEmpty()) {
+ configStream << "QT_GCC_MAJOR_VERSION = " << dictionary["QT_GCC_MAJOR_VERSION"] << endl
+ << "QT_GCC_MINOR_VERSION = " << dictionary["QT_GCC_MINOR_VERSION"] << endl
+ << "QT_GCC_PATCH_VERSION = " << dictionary["QT_GCC_PATCH_VERSION"] << endl;
+ }
+
if (!configStream.flush())
dictionary[ "DONE" ] = "error";
}
@@ -3607,7 +3623,11 @@ void Configure::generateConfigfiles()
if (dictionary["SQL_SQLITE2"] == "yes") qconfigList += "QT_SQL_SQLITE2";
if (dictionary["SQL_IBASE"] == "yes") qconfigList += "QT_SQL_IBASE";
- if (dictionary["POSIX_IPC"] == "yes") qconfigList += "QT_POSIX_IPC";
+ if (dictionary["POSIX_IPC"] == "yes")
+ qconfigList += "QT_POSIX_IPC";
+ else if ((platform() != ANDROID) && (platform() != WINDOWS) && (platform() != WINDOWS_CE)
+ && (platform() != WINDOWS_RT))
+ qconfigList << "QT_NO_SYSTEMSEMAPHORE" << "QT_NO_SHAREDMEMORY";
if (dictionary["FONT_CONFIG"] == "no") qconfigList += "QT_NO_FONTCONFIG";
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index c08595e36b..63c1e8a1f0 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -163,6 +163,18 @@ Compiler Environment::compilerFromQMakeSpec(const QString &qmakeSpec)
return CC_UNKNOWN;
}
+QString Environment::gccVersion()
+{
+ CompilerInfo *info = compilerInfo(CC_MINGW);
+ int returnValue = 0;
+ QString version = execute(QStringLiteral("%1 -dumpversion").arg(info->executable), &returnValue);
+ if (returnValue != 0) {
+ cout << "Could not get mingw version" << returnValue << qPrintable(version);
+ version.resize(0);
+ }
+ return version;
+}
+
/*!
Returns the enum of the compiler which was detected on the system.
The compilers are detected in the order as entered into the
diff --git a/tools/configure/environment.h b/tools/configure/environment.h
index 669c356f34..927c3e294f 100644
--- a/tools/configure/environment.h
+++ b/tools/configure/environment.h
@@ -56,6 +56,7 @@ public:
static Compiler detectCompiler();
static QString detectQMakeSpec();
static Compiler compilerFromQMakeSpec(const QString &qmakeSpec);
+ static QString gccVersion();
static int execute(QStringList arguments, const QStringList &additionalEnv, const QStringList &removeEnv);
static QString execute(const QString &command, int *returnCode = 0);