From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/dolphin/, kde-apps/dolphin/files/
Date: Thu, 24 May 2018 15:30:59 +0000 (UTC) [thread overview]
Message-ID: <1527175812.6fb468f93e623f98f94d4c7585b8228133876187.asturm@gentoo> (raw)
commit: 6fb468f93e623f98f94d4c7585b8228133876187
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu May 24 15:30:12 2018 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu May 24 15:30:12 2018 +0000
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=6fb468f9
kde-apps/dolphin: Fix build with -flto
Package-Manager: Portage-2.3.38, Repoman-2.3.9
kde-apps/dolphin/dolphin-18.04.49.9999.ebuild | 2 +
kde-apps/dolphin/files/dolphin-18.04.1-flto.patch | 96 +++++++++++++++++++++++
2 files changed, 98 insertions(+)
diff --git a/kde-apps/dolphin/dolphin-18.04.49.9999.ebuild b/kde-apps/dolphin/dolphin-18.04.49.9999.ebuild
index 71ed7edb10..4c25caa413 100644
--- a/kde-apps/dolphin/dolphin-18.04.49.9999.ebuild
+++ b/kde-apps/dolphin/dolphin-18.04.49.9999.ebuild
@@ -62,6 +62,8 @@ RDEPEND="${DEPEND}
RESTRICT+=" test"
+PATCHES=( "${FILESDIR}/${PN}-18.04.1-flto.patch" )
+
src_configure() {
local mycmakeargs=(
$(cmake-utils_use_find_package semantic-desktop KF5Baloo)
diff --git a/kde-apps/dolphin/files/dolphin-18.04.1-flto.patch b/kde-apps/dolphin/files/dolphin-18.04.1-flto.patch
new file mode 100644
index 0000000000..8edef6b360
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-18.04.1-flto.patch
@@ -0,0 +1,96 @@
+From b607091c3982f6b84732fcf0c23c1c3f0054f203 Mon Sep 17 00:00:00 2001
+From: Alexander Miller <alex.miller@gmx.de>
+Date: Fri, 18 May 2018 22:43:25 +0200
+Subject: [PATCH 1/2] Remove main.cpp from dolphinstatic_SRCS
+
+Summary:
+The file main.cpp is already in dolphin_SRCS and doesn't
+belong in dolphinstatic_SRCS.
+
+Normally the duplicate object is simply ignored, but with
+link time optimization (LTO), linking dolphin can fail.
+Apparently, the compiler tries to inline inline kdemain()
+in this case. That is undesirable anyway and it ultimately
+fails because the DBusInterface definition is not available:
+
+.../ccHEv6cl.ltrans0.ltrans.o: In function `DBusInterface::~DBusInterface()':
+<artificial>:(.text+0x2583): undefined reference to `vtable for DBusInterface'
+.../ccHEv6cl.ltrans0.ltrans.o: In function `DBusInterface::~DBusInterface()':
+<artificial>:(.text+0x5aa3): undefined reference to `vtable for DBusInterface'
+.../ccHEv6cl.ltrans0.ltrans.o: In function `kdemain':
+<artificial>:(.text+0x7686): undefined reference to `DBusInterface::DBusInterface()'
+<artificial>:(.text+0x7b64): undefined reference to `vtable for DBusInterface'
+collect2: error: ld returned 1 exit status
+
+See also <https://bugs.gentoo.org/655710>.
+
+Reviewers: #dolphin, elvisangelaccio
+
+Reviewed By: elvisangelaccio
+
+Subscribers: elvisangelaccio, asturmlechner, kfm-devel
+
+Tags: #dolphin
+
+Differential Revision: https://phabricator.kde.org/D12929
+---
+ src/CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 263b3ff0c..e8fe719a4 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -207,7 +207,6 @@ set(dolphinstatic_SRCS
+ dolphintabwidget.cpp
+ trash/dolphintrash.cpp
+ filterbar/filterbar.cpp
+- main.cpp
+ panels/information/filemetadataconfigurationdialog.cpp
+ panels/information/informationpanel.cpp
+ panels/information/informationpanelcontent.cpp
+--
+2.17.0
+
+
+From 8e6f4eecd318041d2e4e6386d1660742dd4ddd89 Mon Sep 17 00:00:00 2001
+From: Alexander Miller <alex.miller@gmx.de>
+Date: Fri, 18 May 2018 22:44:52 +0200
+Subject: [PATCH 2/2] Make target_link_libraries for kdeinit_dolphin PRIVATE
+
+Summary:
+There is no need to add all of kdeinit_dolphin's
+dependencies (including the static archive) when
+linking dolphin; kdemain is the only needed symbol.
+Mark the link libraries PRIVATE to simplify the
+link command for dolphin.
+
+Reviewers: #dolphin, elvisangelaccio
+
+Reviewed By: elvisangelaccio
+
+Subscribers: asturmlechner, kfm-devel
+
+Tags: #dolphin
+
+Differential Revision: https://phabricator.kde.org/D12931
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e8fe719a4..beaa0ec50 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -299,7 +299,7 @@ ecm_add_app_icon(dolphin_SRCS ICONS ${ICONS_SRCS})
+ kf5_add_kdeinit_executable(dolphin ${dolphin_SRCS})
+
+
+-target_link_libraries(kdeinit_dolphin
++target_link_libraries(kdeinit_dolphin PRIVATE
+ dolphinstatic
+ dolphinprivate
+ )
+--
+2.17.0
+
next reply other threads:[~2018-05-24 15:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-24 15:30 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-05-12 7:50 [gentoo-commits] proj/kde:master commit in: kde-apps/dolphin/, kde-apps/dolphin/files/ Andreas Sturmlechner
2020-04-13 9:00 Andreas Sturmlechner
2020-02-16 10:39 Andreas Sturmlechner
2019-12-10 1:06 Andreas Sturmlechner
2015-08-27 10:38 Michael Palimaka
2015-02-18 6:37 Johannes Huber
2015-01-19 21:56 Johannes Huber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1527175812.6fb468f93e623f98f94d4c7585b8228133876187.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox