99d5928ab629dd38532fff3dde2bc0eb5d10f02b
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / qt5 / qt5base / 0005-no-gold-linker-for-host-build.patch
1 Use the gold linker only for target builds
2
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.
6
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
9 support gold.
10
11 Bug reported upstream at https://bugreports.qt.io/browse/QTBUG-46125.
12
13 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
14
15 Index: b/mkspecs/features/default_post.prf
16 ===================================================================
17 --- a/mkspecs/features/default_post.prf
18 +++ b/mkspecs/features/default_post.prf
19 @@ -62,7 +62,7 @@
20      QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
21  }
22  
23 -use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
24 +!host_build: use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
25  
26  dll:win32: QMAKE_LFLAGS += $$QMAKE_LFLAGS_DLL
27  static:mac: QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB