xref: /OK3568_Linux_fs/yocto/meta-qt5/recipes-qt/qt5/qtbase/0012-Disable-ltcg-for-host_build.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 5c5461c606b028bf3b31e370a43fba2ce8156b36 Mon Sep 17 00:00:00 2001
2From: Samuli Piippo <samuli.piippo@qt.io>
3Date: Tue, 23 Oct 2018 09:54:57 +0300
4Subject: [PATCH] Disable ltcg for host_build
5
6debug-prefix-map does not work correctly for static libraries
7when using ltcg, and since host_build compilations link agaist
8the libQt5Bootstrap.a library, it breaks source file packaging
9into debug packages.
10
11Task-number: QTBUG-71230
12Upstream-Status: Inappropriate [embedded specific]
13Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
14---
15 mkspecs/features/ltcg.prf | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf
19index d81f340edd..dc1d196710 100644
20--- a/mkspecs/features/ltcg.prf
21+++ b/mkspecs/features/ltcg.prf
22@@ -1,6 +1,6 @@
23 static:no-static-ltcg {
24     # Static library but no-static-ltcg enabled: skip LTCG
25-} else: CONFIG(release, debug|release) {
26+} else: CONFIG(release, debug|release):!host_build {
27     separate_debug_info {
28         # Evaluate single-$ variable references that have no valid value at mkspec loading time
29         QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO ~= s/\\$\\{/\$\$\{/
30