Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.4.0
-
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 |
113563,3 | Disable gold linker/new dtags support for host builds | 5.5 | qt/qtbase | Status: MERGED | +2 | 0 |