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

QtWebEngine incorrect pass cflags when QMAKE_CFLAGS contains MIPS GCC flags (for example: -march=mips32r5 -mtune=p5600)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • None
    • 5.7.0
    • WebEngine
    • None

    Description

      In the Qt build system there are some issues related to passing CFLAGS to the QtWebEngine build system during the process of building whole Qt (when the parameter -skip qtwebengine is not used). Qt build system reads the contents of QMAKE_CFLAGS and declare ninja variables according to found options. If we consider the qtwebengine/src/core/gyp_run.pro we can find the code for parsing QMAKE_CFLAGS contains. For example, when we deal to MIPS architecture the code of gyp_run.pro trying to find the "mips32r2" substring in the value of QMAKE_CFLAGS variable:

      contains(QMAKE_CFLAGS, "mips32r2"): mips_arch_variant=\"r2\"

      But in the QMAKE_CFLAGS variable the contains() function cannot find "mips32r2" string because the GCC option can be "-march=mips32r2". Also in the code above we have to add mips_arch_variant variable into GYP_CONFIG. So the correct code should be loke follow:

      contains(QMAKE_CFLAGS, "-march=mips32r2"): GYP_CONFIG += mips_arch_variant=\"r2\"

      Further created ninja variables are processed in the file qtwebengine/src/3rdparty/chromium/build/common.gypi where we also can see incorrect or not fulfill behaviour.

      Also the files qtwebengine/src/core/gyp_run.pro and qtwebengine/src/3rdparty/chromium/build/common.gypi do not contains any handlers for mips32r5 architecture. For example to tune compilation for the P5600 architecture we have to pass the following options to GCC-5.3.0

      $ ${CROSS_COMPILE}gcc -march=mips32r5 -mtune=p5600

      For GCC-5.4.0 we can simplify our controls to the only one option: -march=p5600.

      Please considere the attached patch and make decision about improvement the WebEngine build system.

      Attachments

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

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            kosteltsev Andrey Kosteltsev
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes