From 46d69aa091392f388234c1f2b859570a7bbb33289177b7512d8dcd7472509e31 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Fri, 12 Jul 2019 12:09:08 +0000 Subject: [PATCH 1/2] Accepting request 714857 from home:Vogtinator:qt5.13 - Add patch to fix build with LTO enabled: * lto-workaround.patch OBS-URL: https://build.opensuse.org/request/show/714857 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.13/libqt5-qt3d?expand=0&rev=7 --- libqt5-qt3d.changes | 6 ++++++ libqt5-qt3d.spec | 4 +++- lto-workaround.patch | 30 ++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 lto-workaround.patch diff --git a/libqt5-qt3d.changes b/libqt5-qt3d.changes index 6023be4..d3de71c 100644 --- a/libqt5-qt3d.changes +++ b/libqt5-qt3d.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 12 11:42:02 UTC 2019 - Fabian Vogt + +- Add patch to fix build with LTO enabled: + * lto-workaround.patch + ------------------------------------------------------------------- Wed Jun 19 11:18:55 UTC 2019 - fabian@ritter-vogt.de diff --git a/libqt5-qt3d.spec b/libqt5-qt3d.spec index c3f6126..7552d5c 100644 --- a/libqt5-qt3d.spec +++ b/libqt5-qt3d.spec @@ -33,6 +33,8 @@ Url: https://www.qt.io %define tar_version qt3d-everywhere-src-5.13.0 Source: https://download.qt.io/official_releases/qt/5.13/%{real_version}/submodules/%{tar_version}.tar.xz Source1: baselibs.conf +# PATCH-FIX-OPENSUSE (until upstream solution available) +Patch1: lto-workaround.patch BuildRequires: fdupes BuildRequires: libQt5Bootstrap-devel-static >= %{version} BuildRequires: libQt5Concurrent-devel >= %{version} @@ -56,7 +58,7 @@ Qt 3D provides functionality for near-realtime simulation systems with support for 2D and 3D rendering in both Qt C++ and Qt Quick applications. %prep -%setup -q -n %{tar_version} +%autosetup -p1 -n %{tar_version} %package -n %libname Summary: Qt 5 3D Addon diff --git a/lto-workaround.patch b/lto-workaround.patch new file mode 100644 index 0000000..bfb68ef --- /dev/null +++ b/lto-workaround.patch @@ -0,0 +1,30 @@ +From: Fabian Vogt +Subject: resources_big is incompatible with -flto in CXXFLAGS + +See https://bugreports.qt.io/browse/QTBUG-73834 + +Index: qt3d-everywhere-src-5.13.0/examples/qt3d/examples.pri +=================================================================== +--- qt3d-everywhere-src-5.13.0.orig/examples/qt3d/examples.pri ++++ qt3d-everywhere-src-5.13.0/examples/qt3d/examples.pri +@@ -1,7 +1,6 @@ + TEMPLATE = app + + QT += 3dextras +-CONFIG += resources_big + + target.path = $$[QT_INSTALL_EXAMPLES]/qt3d/$$TARGET + INSTALLS += target +Index: qt3d-everywhere-src-5.13.0/examples/qt3d/planets-qml/planets-qml.pro +=================================================================== +--- qt3d-everywhere-src-5.13.0.orig/examples/qt3d/planets-qml/planets-qml.pro ++++ qt3d-everywhere-src-5.13.0/examples/qt3d/planets-qml/planets-qml.pro +@@ -8,7 +8,7 @@ QT += qml quick \ + 3dquick 3dquickrender 3dquickinput 3dquickextras \ + network + +-CONFIG += resources_big c++11 ++CONFIG += c++11 + + HEADERS += \ + networkcontroller.h From 30a3269caa2fddef7eae3b7e7a259501d07707f8431d9432aaa6f21072b4cf88 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Tue, 16 Jul 2019 13:56:24 +0000 Subject: [PATCH 2/2] Accepting request 715703 from home:Vogtinator:qt5.13 - Drop lto-workaround.patch in favor of just disabling LTO OBS-URL: https://build.opensuse.org/request/show/715703 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.13/libqt5-qt3d?expand=0&rev=8 --- libqt5-qt3d.changes | 5 +++++ libqt5-qt3d.spec | 4 ++-- lto-workaround.patch | 30 ------------------------------ 3 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 lto-workaround.patch diff --git a/libqt5-qt3d.changes b/libqt5-qt3d.changes index d3de71c..8f05cf5 100644 --- a/libqt5-qt3d.changes +++ b/libqt5-qt3d.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 12 13:21:22 UTC 2019 - Fabian Vogt + +- Drop lto-workaround.patch in favor of just disabling LTO + ------------------------------------------------------------------- Fri Jul 12 11:42:02 UTC 2019 - Fabian Vogt diff --git a/libqt5-qt3d.spec b/libqt5-qt3d.spec index 7552d5c..7bf4262 100644 --- a/libqt5-qt3d.spec +++ b/libqt5-qt3d.spec @@ -33,8 +33,6 @@ Url: https://www.qt.io %define tar_version qt3d-everywhere-src-5.13.0 Source: https://download.qt.io/official_releases/qt/5.13/%{real_version}/submodules/%{tar_version}.tar.xz Source1: baselibs.conf -# PATCH-FIX-OPENSUSE (until upstream solution available) -Patch1: lto-workaround.patch BuildRequires: fdupes BuildRequires: libQt5Bootstrap-devel-static >= %{version} BuildRequires: libQt5Concurrent-devel >= %{version} @@ -415,6 +413,8 @@ the exact Qt version. %postun -n libQt53DQuickExtras5 -p /sbin/ldconfig %build +# -flto breaks CONFIG += resources_big (QTBUG-73834), but resources_big is needed to prevent excessive memory use +%define _lto_cflags %{nil} %if %qt5_snapshot #force the configure script to generate the forwarding headers (it checks whether .git directory exists) mkdir .git diff --git a/lto-workaround.patch b/lto-workaround.patch deleted file mode 100644 index bfb68ef..0000000 --- a/lto-workaround.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Fabian Vogt -Subject: resources_big is incompatible with -flto in CXXFLAGS - -See https://bugreports.qt.io/browse/QTBUG-73834 - -Index: qt3d-everywhere-src-5.13.0/examples/qt3d/examples.pri -=================================================================== ---- qt3d-everywhere-src-5.13.0.orig/examples/qt3d/examples.pri -+++ qt3d-everywhere-src-5.13.0/examples/qt3d/examples.pri -@@ -1,7 +1,6 @@ - TEMPLATE = app - - QT += 3dextras --CONFIG += resources_big - - target.path = $$[QT_INSTALL_EXAMPLES]/qt3d/$$TARGET - INSTALLS += target -Index: qt3d-everywhere-src-5.13.0/examples/qt3d/planets-qml/planets-qml.pro -=================================================================== ---- qt3d-everywhere-src-5.13.0.orig/examples/qt3d/planets-qml/planets-qml.pro -+++ qt3d-everywhere-src-5.13.0/examples/qt3d/planets-qml/planets-qml.pro -@@ -8,7 +8,7 @@ QT += qml quick \ - 3dquick 3dquickrender 3dquickinput 3dquickextras \ - network - --CONFIG += resources_big c++11 -+CONFIG += c++11 - - HEADERS += \ - networkcontroller.h