Remove main.cpp from dolphinstatic_SRCS
ClosedPublic

Authored by almiller on May 16 2018, 3:39 PM.

Details

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.

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
almiller created this revision.May 16 2018, 3:39 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptMay 16 2018, 3:39 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
almiller requested review of this revision.May 16 2018, 3:39 PM
elvisangelaccio added a subscriber: elvisangelaccio.

Thanks. Do you have commit access? If not, what email should we use for the commit authorship?

This revision is now accepted and ready to land.May 16 2018, 9:18 PM

No, I don't have commit access. Use "Alexander Miller <alex.miller@gmx.de>" for the author tag.

This revision was automatically updated to reflect the committed changes.