What do you mean? you notice lots of difference in startup times with --as-needed?Everybody notices how fast a program takes to launch
Code: Select all
ldd -u -r 'bin_name'Code: Select all
gcc -o hello_world hello_world.cCode: Select all
gcc -o hello_world hello_world.c -lX11Code: Select all
gcc -Wl,--as-needed -o hello_world hello_world.c -lX11I have been keeping a list of packages that do and do not work. Which packages work correctly for you with --as-needed?ravageNG wrote:Just noticed that kdevelop does _NOT_ work when compiled with -Wl,--as-needed.
But this seems so far the only app failed.
is it possible that it could be a prelink bug rather then a true incompatibility?ravageNG wrote:After compiling kdevelop without --as-needed in crashes when creating new projects.
Recompiling cervisia helps.
So cervisia does _NOT_ work with --as-needed.
![]()
PRELINK:
After using --as-needed for example to compile konsole and kdesktop (which are working) _AND_ running prelink -aR
--> prelink warns
--> konsole / kdesktop won't start (unresolved symbol)
So it seems you can't use prelink and --as-needed together!?!?
This could be caused by the runtime-linking gstreamer uses (or something like that), to enable plugins etc. It is possible evolution wont work very well too because of some similar issue (you'll loose your calendar and todo list functionality).suka wrote:I got into problems with quite a few programs: Totem, Sound-Juicer, basically all the GStreamer stuff, also gnome-system-tools and evince. On the other hand it seems to really speed up startup of some other stuff...Rapsey wrote: But it can cause problems for some programs apparently. I used it on programs that I find realy annoyingly slow to load: gedit, gnome-console, gaim, totem, rhythmbox. None of them have any problems.
So I guess we should not put it into make.conf. Can someone tell me how to set it, so that portage will only use it on specific programs?
I've proven this remark partly wrong!haven wrote:From what I read, those applications that have a plugin architecture are doomed to fail with this optimisation (i.e. apache)
Code: Select all
shrek@maximus ~ $ emerge --info | grep LDFLAGS
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -Wl,--as-needed -s"Code: Select all
maximus shrek # equery uses apache
[ Searching for packages matching apache... ]
[ Colour Code : set unset ]
[ Legend : Left column (U) - USE flags from make.conf ]
[ : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for net-www/apache-2.0.53 ]
U I
+ + apache2 : Chooses Apache2 support when a package supports both Apache1 and Apache2
- - debug : Tells configure and the makefiles to build for debugging. Effects vary across packages, but generally it will at least add -g to CFLAGS. Remember to set FEATURES=nostrip too
- - doc : Adds extra documentation (API, Javadoc, etc)
- - ldap : Adds LDAP support (Lightweight Directory Access Protocol)
- - mpm-leader : Adds support for the leader Apache MPM
- - mpm-peruser : Adds support for the peruser Apache MPM
- - mpm-prefork : Adds support for the prefork Apache MPM
- - mpm-threadpool : Adds support for the threadpool Apache MPM
- - mpm-worker : Adds support for the worker Apache MPM
- - no-suexec : Don't install suexec with apache
+ + ssl : Adds support for Secure Socket Layer connections
+ + static-modules : Build modules into apache instead of having them load at run time
+ + threads : Adds threads support for various packages. Usually pthreadsCode: Select all
emerge -e system && emerge -e system && emerge -e worldI'm still not convinced it's an optimization in anything except # of linked packages that you see when you check with ldd.kimchi_sg wrote:Now embarking onwith this little optimisation. :DCode: Select all
emerge -e system && emerge -e system && emerge -e world

Code: Select all
--as-neededCode: Select all
inherit flag-o-maticCode: Select all
# This LDFLAG breaks "bmp"
filter-ldflags "-Wl,--as-needed"Code: Select all
filter-flags "-Wl,--as-needed"