Support a MinGW mkspec with name different than "win32-g++"
Just in case we have "win32-g++-32" in the future, when MinGW-w64 is able to build 32-bit executables with just the -m32 switch. Change-Id: I4ae0f684ebc55465702652b2798f754575b62849 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
47e64031e3
commit
33a43cdbf2
@ -307,7 +307,7 @@ Configure::Configure(int& argc, char** argv)
|
||||
dictionary[ "NATIVE_GESTURES" ] = "yes";
|
||||
dictionary[ "MSVC_MP" ] = "no";
|
||||
|
||||
if (dictionary["QMAKESPEC"] == QString("win32-g++")) {
|
||||
if (dictionary["QMAKESPEC"].startsWith("win32-g++")) {
|
||||
const QString zero = QStringLiteral("0");
|
||||
const QStringList parts = Environment::gccVersion().split(QLatin1Char('.'));
|
||||
dictionary["QT_GCC_MAJOR_VERSION"] = parts.value(0, zero);
|
||||
@ -1428,7 +1428,7 @@ void Configure::parseCmdLine()
|
||||
dictionary[ "QMAKESPEC" ].endsWith("-msvc2015")) {
|
||||
if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake";
|
||||
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32";
|
||||
} else if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) {
|
||||
} else if (dictionary[ "QMAKESPEC" ].startsWith(QLatin1String("win32-g++"))) {
|
||||
if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "mingw32-make";
|
||||
dictionary[ "QMAKEMAKEFILE" ] = "Makefile.unix";
|
||||
} else {
|
||||
@ -4313,8 +4313,8 @@ void Configure::buildQmake()
|
||||
(QFile::exists(sourcePath + "/.git") ? ".." : sourcePath)
|
||||
+ "/include") << endl;
|
||||
stream << "QT_VERSION = " << dictionary["VERSION"] << endl;
|
||||
if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) {
|
||||
stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\win32-g++" << endl
|
||||
if (dictionary[ "QMAKESPEC" ].startsWith("win32-g++")) {
|
||||
stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\" << dictionary[ "QMAKESPEC" ] << endl
|
||||
<< "EXTRA_CFLAGS = -DUNICODE -ffunction-sections" << endl
|
||||
<< "EXTRA_CXXFLAGS = -DUNICODE -ffunction-sections" << endl
|
||||
<< "EXTRA_LFLAGS = -Wl,--gc-sections" << endl
|
||||
|
Loading…
x
Reference in New Issue
Block a user