[PATCH] libkdeinit symbol pruning
Karl Vogel
karl.vogel at seagha.com
Tue Jul 20 13:59:42 CEST 2004
David Faure wrote:
> Yes - this is certainly doable, especially now that we use the
> KDEINIT_VSCRIPT define. kded/Makefile.am can set KDEINIT_VSCRIPT to a
> kded.map which does the above. The only problem is that I can't test this
> since there's no unsermake patch that includes defining KDEINIT_VSCRIPT
> yet (and my python knowledge is inexistent) - help!
Well I had a stab at the unsermake patch, but failed miserably.. just adding
the KDEINIT_VSCRIPT to the linker line works.. but adding the test for the
include_VERSION_SCRIPT somehow seems to cause problems (and well I'm not
familiar enough with unsermake)
Patch below unconditionally uses the version script. The commented out line
should normally test the include_VERSION_SCRIPT condition, but that seems to
create an endless loop :(
Index: kdeinit.um
===================================================================
RCS file: /home/kde/kdenonbeta/unsermake/kdeinit.um,v
retrieving revision 1.11
diff -u -r1.11 kdeinit.um
--- kdeinit.um 7 Sep 2003 16:41:20 -0000 1.11
+++ kdeinit.um 19 Jul 2004 18:59:57 -0000
@@ -29,8 +29,10 @@
ldflags = string.strip (string.replace (ldflags + ' ', '-module ', ' '))
ldflags = string.strip (string.replace (ldflags + ' ', '$(KDE_PLUGIN) ', ' '))
# first, we add the definitions for libkdeinit_<bin>.la
+ #amfile.add_define('KDEINIT_VSCRIPT', '-Wl,--version-script=\$(top_srcdir)/admin/kdeinit.map', "include_VERSION_SCRIPT")
+ amfile.add_define('KDEINIT_VSCRIPT', '-Wl,--version-script=$(top_srcdir)/admin/kdeinit.map')
amfile.add_define('libkdeinit_' + canon_name + '_la_LDFLAGS',
- ldflags + ' -avoid-version -no-undefined')
+ ldflags + ' \$(KDEINIT_VSCRIPT) -avoid-version -no-undefined')
amfile.add_define('libkdeinit_' + canon_name + '_la_SOURCES',
amfile.value_of(bin.canon_name + '_SOURCES') )
amfile.add_define('libkdeinit_' + canon_name + '_la_LIBADD',
More information about the Kde-optimize
mailing list