From 8d854724ae70112e0961303ae8119510dedf799e Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 12 Nov 2018 15:38:11 +0200 Subject: qtbase: disable lto for static libs If static libs are compiled with lto and tried to be used on a Window host, the linker will fail with error: "plugin needed to handle lto object" Fixed: QTBUG-71749 Change-Id: I8811faca15307d82173b6ee9e5ffca1114898cd9 Reviewed-by: Mikko Gronoff --- .../recipes-qt/qt5/qtbase/0015-Disable-ltcg-for-host_build.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (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 index 420e718..a7ee953 100644 --- 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 @@ -11,6 +11,9 @@ into debug packages. Also disable ltcg when compiling on Windows host platform, as GCC7 does not support lto with mingw. +Disable also for static builds since those libraries can be linked +on Windows host, where the lto built binaries won't work. + Task-number: QTBUG-71230 Change-Id: I5bea76ea03bf1943b0cfaf03d46a4840bd99a28b Upstream-Status: Inappropriate [embedded specific] @@ -24,7 +27,7 @@ index ccf0226272..00118be872 100644 +++ b/mkspecs/features/ltcg.prf @@ -1,4 +1,4 @@ -CONFIG(release, debug|release) { -+CONFIG(release, debug|release):!host_build:!equals(QMAKE_HOST.os, Windows) { ++CONFIG(release, debug|release):!host_build:!equals(QMAKE_HOST.os, Windows):!staticlib { # 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