diff options
author | Tuomas Suutari <tuomas.suutari@gmail.com> | 2010-08-18 10:41:24 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-08-18 18:25:29 (GMT) |
commit | 0e443155c99a1ba9b990e7a2195132b2b8a1d36e (patch) | |
tree | 4626fba47bb38e9952c0af98cb72d071e0f1c0bc /qmake | |
parent | 8dd8db250d92521fda619bdcf3e1c859b37b2da0 (diff) | |
download | Qt-0e443155c99a1ba9b990e7a2195132b2b8a1d36e.zip Qt-0e443155c99a1ba9b990e7a2195132b2b8a1d36e.tar.gz Qt-0e443155c99a1ba9b990e7a2195132b2b8a1d36e.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>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 5685d6b..4717542 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(); |