kdeinit compiled with gcc 4.0.1 & visibility busted at runtime
Michael Nottebrock
lofi at freebsd.org
Sun Jul 17 22:11:39 BST 2005
On Sunday, 17. July 2005 22:57, David Faure wrote:
> On Sunday 17 July 2005 13:58, Michael Nottebrock wrote:
> > Found a workaround: Hand-editing the generated klauncher_dummy.cpp and
> > doing
> >
> > -extern "C" int kdeinitmain(int argc, char* argv[]) { return
> > kdemain(argc,argv); }
> > +extern "C" __attribute__ ((visibility("default"))) int kdeinitmain(int
> > argc, char* argv[]) { return kdemain(argc,argv); }
> >
> > fixes things. Looks like we need some additional smartness in am_edit re.
> > KDE_EXPORT? Or perhaps special-casing kdeinit will be enough - I didn't
> > experience similar problems anywhere else (yet).
>
> Amazing that this didn't come up before (for other people with
> gcc-with-visibility-support).
>
> How about this?
>
> --- am_edit (revision 434767)
> +++ am_edit (working copy)
> @@ -868,12 +868,12 @@ sub tag_KDEINIT()
> push(@progs, $kdeinit);
>
> $lines .= "\n${kdeinit}.la.$cxxsuffix:\n";
> - $lines .= "\techo 'extern \"C\" int kdemain(int argc,
> char* argv[]);' > ${kdeinit}.la.$cxxsuffix; \\\n"; + $lines
> .= "\techo 'extern \"C\" KDE_EXPORT int kdemain(int argc, char* argv[]);' >
> ${kdeinit}.la.$cxxsuffix; \\\n"; $lines .= "\techo 'int main(int argc,
> char* argv[]) { return kdemain(argc,argv); }' >>
> ${kdeinit}.la.$cxxsuffix\n";
[...]
That will probably not work - at least not in kdelibs/kinit. I tried that
first, but KDE_EXPORT is of course undefined in _dummy.cpp files with nothing
in them but extern "C" declarations.
--
,_, | Michael Nottebrock | lofi at freebsd.org
(/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org
\u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050717/0f557beb/attachment.sig>
More information about the kde-core-devel
mailing list