Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63637

Cross compilation on Linux targeting MinGW is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9
    • 5.9.2
    • Build tools: qmake
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mstorsjo Martin Storsjö
              erict Eric
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes