Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.2
-
None
-
8cef809b16aac9d4c4163ff2e2e831adf70133c2
Description
Qt 5.9.2 has broken compilation on Linux for MinGW (it was ok with 5.9.1, it is a regression).
During cross compilation:
Change in "win32-g++/qmake.conf":
-QMAKE_LINK_OBJECT_MAX = 10 -QMAKE_LINK_OBJECT_SCRIPT = object_script +equals(QMAKE_HOST.os, Windows) { + QMAKE_LINK_OBJECT_MAX = 10 + QMAKE_LINK_OBJECT_SCRIPT = object_script +}
Makes QMAKE_LINK_OBJECT_MAX undefined.
And in qtbase/qmake/generators/win32/mingw_make.cpp:335
if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) { t << "\n\t$(LIB) $(DESTDIR_TARGET) " << objectsLinkLine << " " ; } else { t << "\n\t" << objectsLinkLine << " " ; }
Makes condition always false.
And lead to incorrect makefile:
$(DESTDIR_TARGET): $(OBJECTS) -$(DEL_FILE) $(DESTDIR_TARGET) 2>/dev/null $(OBJECTS)
Instead of:
$(DESTDIR_TARGET): $(OBJECTS) -$(DEL_FILE) $(DESTDIR_TARGET) 2>/dev/null $(LIB) $(DESTDIR_TARGET) $(OBJECTS)
Propagating same fix for QTBUG-61335 fixes the issue.
Attachments
Issue Links
- is duplicated by
-
QTBUG-63659 qmake generates invalid Makefile for PCRE2, failing the Qt build
- Closed
-
QTBUG-65721 Cross-compile error due to faulty Makefile
- Closed
-
QTBUG-63906 Errors in cross-compile to Windows from Linux using mingw
- Closed
- resulted from
-
QTBUG-61335 ar MRI scripts with Link time optimization breaks Qt build
- Closed