From ec33927f7e3f80bbcfde9a46eba201cb6210708f Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 5 Nov 2018 17:10:50 +0200 Subject: qtbase: disable ltcg on windows host GCC7 does not support LTO with mingw, which means we cannot use the ltcg option when cross-compiling on Windows host. Update upstream patch that disables ltcg for host_builds and extend it for builds on Windows hosts. Task-number: QTBUG-71596 Fixes: QTBUG-71596 Change-Id: I8ab7ec36f964c95c2189a77bdde6e08bd2817234 Reviewed-by: Mikko Gronoff --- .../qtbase/0015-Disable-ltcg-for-host_build.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 meta-boot2qt-distro/recipes-qt/qt5/qtbase/0015-Disable-ltcg-for-host_build.patch (limited to 'meta-boot2qt-distro') diff --git a/meta-boot2qt-distro/recipes-qt/qt5/qtbase/0015-Disable-ltcg-for-host_build.patch b/meta-boot2qt-distro/recipes-qt/qt5/qtbase/0015-Disable-ltcg-for-host_build.patch new file mode 100644 index 0000000..420e718 --- /dev/null +++ b/meta-boot2qt-distro/recipes-qt/qt5/qtbase/0015-Disable-ltcg-for-host_build.patch @@ -0,0 +1,30 @@ +From 9b541f4f6272c4ed4bb5bf6591e9a65cded6fdfa Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Tue, 23 Oct 2018 09:54:57 +0300 +Subject: [PATCH] Disable ltcg for host_build + +debug-prefix-map does not work correctly for static libraries +when using ltcg, and since host_build compilations link agaist +the libQt5Bootstrap.a library, it breaks source file packaging +into debug packages. + +Also disable ltcg when compiling on Windows host platform, +as GCC7 does not support lto with mingw. + +Task-number: QTBUG-71230 +Change-Id: I5bea76ea03bf1943b0cfaf03d46a4840bd99a28b +Upstream-Status: Inappropriate [embedded specific] +--- + mkspecs/features/ltcg.prf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf +index ccf0226272..00118be872 100644 +--- a/mkspecs/features/ltcg.prf ++++ b/mkspecs/features/ltcg.prf +@@ -1,4 +1,4 @@ +-CONFIG(release, debug|release) { ++CONFIG(release, debug|release):!host_build:!equals(QMAKE_HOST.os, Windows) { + # We need fat object files when creating static libraries on some platforms + # so the linker will know to load a particular object from the library + # in the first place. On others, we have special ar and nm to create the symbol -- cgit v1.2.3-54-g00ecf