summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTuomas Suutari <tuomas.suutari@gmail.com>2010-08-18 10:41:24 (GMT)
committerSamuli Piippo <samuli.piippo@digia.com>2011-06-09 10:06:43 (GMT)
commitef3631084d3a1db48f1ee4ddecda337c352787ca (patch)
treec40fa5e34d824e1afbac9b2b58749c79ec624986
parentcf4c6c427dab26a8fdeca0f60338e7298a696394 (diff)
downloadQt-ef3631084d3a1db48f1ee4ddecda337c352787ca.zip
Qt-ef3631084d3a1db48f1ee4ddecda337c352787ca.tar.gz
Qt-ef3631084d3a1db48f1ee4ddecda337c352787ca.tar.bz2
QMake/Win32/MinGW: Fix ar script generating with absolute paths
When QMake decides to use absolute path for some object file, this code used to leave the ADDMOD command out from the ar object script, which resulted in following errors from the issued "ar -M" command: Syntax error in archive script, line 2 Syntax error in archive script, line 3 etc... And the build failed in the linking phase, because the generated static library was empty. Fix this issue by prepending the file name with ADDMOD command even if the file path is absolute. Task-number: QTBUG-12959 Merge-request: 2451 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> (cherry picked from commit 0e443155c99a1ba9b990e7a2195132b2b8a1d36e)
-rw-r--r--qmake/generators/win32/mingw_make.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 0dccbd1..a17a73f 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -191,10 +191,7 @@ void createArObjectScriptFile(const QString &fileName, const QString &target, co
QTextStream t(&file);
t << "CREATE " << target << endl;
for (QStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
- if (QDir::isRelativePath(*it))
- t << "ADDMOD " << *it << endl;
- else
- t << *it << endl;
+ t << "ADDMOD " << *it << endl;
}
t << "SAVE" << endl;
t.flush();