1 Use the gold linker only for target builds
3 Availability of the gold linker is only tested with the
4 cross-compiler, not the host compiler, so Qt shouldn't assume it's
5 available when doing host builds.
7 This fixes build failures occuring when cross-compiling Qt5 with a
8 gold capable cross-compiler, on a host that has a too old compiler to
11 Bug reported upstream at https://bugreports.qt.io/browse/QTBUG-46125.
13 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
15 Index: b/mkspecs/features/default_post.prf
16 ===================================================================
17 --- a/mkspecs/features/default_post.prf
18 +++ b/mkspecs/features/default_post.prf
20 QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
23 -use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
24 +!host_build: use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
26 dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL
27 static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB