I noticed that there is a "static" USE flag for portage in /usr/portage/profiles/use.desc. This leads to me to think... Would compiling stuff like X, Mozilla, Enlightenement, and galeon run faster? It wouldn't have to load the libraries at run time right?_________________- Kyle Manna

It would have to load the extra functions statically linked into the binary, so the binaries would be larger. You wouldn't save on load time if a library is already in memory. Static binaries would run slightly faster, everthing else being equil.

Static binaries would be more reliable however, in that they won't break if an underlying library is removed/upgraded (libpng).

In addition to what slik pointed out, here are some negatives (I'm naturally pessimistic ):

#1 You also wouldn't be able to fix bugs in the libraries by upgrading the library package. Think of the zlib security bug that was found a little bit ago.

#2 The size of the binary would also increase, and if this is done as a system-wide policy, a substantial amount of space could be wasted. Of course, this probably only matters on space-constrained system ... not such a big deal when installing on a 20+ gb ext3 partition.

For me, #1 is probably the biggest reason to use dynamic libraries. But then again, you could just say that the potential to create bugs balances out the potential to fix bugs.

I tend to agree with slik - the best reason for compiling statically is to keep your executable from breaking when system libraries get upgraded. Speed seems to be an issue in Linux with large C++ libraries like KDE has to deal with - hence the objprelink hack. The other edge of the static compiling sword is that you're going to have more copies of the same code loaded into memory, which is a less efficient use of resources than shared libraries.