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

Incorrect use of -fuse-ld=gold with the host compiler

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.5.1
    • 5.4.0
    • Build System
    • None
    • 2cb4b7e947f64580592afaf221d4b261d980bb45

    Description

      Qt configure script tests whether the compiler supports -fuse-ld=gold before using it. However, it does this test only with the target compiler (which might be a cross-compiler), and then uses it for both target compilations and host compilations. If you are in a situation where the cross-compile supports -fuse-ld=gold, but not the host compiler, you get build failures like:

      g++ Wl,-gc-sections -Wl,-O1 -fuse-ld=gold -o ../../../bin/uic .obj/customwidgetsinfo.o .obj/databaseinfo.o .obj/driver.o .obj/treewalker.o .obj/ui4.o .obj/validator.o .obj/cppextractimages.o .obj/cppwritedeclaration.o .obj/cppwriteicondata.o .obj/cppwriteicondeclaration.o .obj/cppwriteiconinitialization.o .obj/cppwriteincludes.o .obj/cppwriteinitialization.o .obj/main.o .obj/uic.o -L/home/peko/autobuild/instance-1/output/build/qt5base-5.4.1/lib -lQt5Bootstrap -lpthread
      g++: error: unrecognized command line option '-fuse-ld=gold'

      The attached patch fixes this problem by not using -fuse-ld=gold for host builds.

      Attachments

        For Gerrit Dashboard: QTBUG-46125
        # Subject Branch Project Status CR V

        Activity

          People

            p_seiderer Peter Seiderer
            tpetazzoni Thomas Petazzoni
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes