[wplug] Compiler questions

Bill Moran wmoran at potentialtech.com
Wed Feb 2 12:08:13 EST 2005


"Embery, Nathan" <Nathan.Embery at crowncastle.com> wrote:

> So, I was thinking the other day about how all these gentoo users keep
> saying how gentoo is so much better because it compiles everything for you
> hardware, and I've come to realize that's a bunch of crap. :) Or, is it?

see http://www.potentialtech.com/wmoran/source.php

> I mean, since the compiler doesn't actually inspect your hardware and the
> configure script just sets up your Makefile according to your software env,
> where exactly does this magical 'for your hardware' thing come into play?
> Really, all you can do is set -march= and maybe an optimization flag like
> -O2 or something...
> 
> So, the question is, am I missing something? Or is it really unnecessary to
> compile yourself when there are already 686 optimized binaries available?
> Why even go to the trouble?

If there aren't 686 optimized binaries available.

> Obviously, there are size advantages to configuring you own kernel and
> excluded exotic things you'll never need like ISDN and ancient chipset
> support or whatever, but I just don't see it for you average software
> package like mplayer.

mplayer is not "average software" in this regard.  mplayer is a program
that will experience better than average performance improvements from
proper compile-time optimizations.  What do you think MMX and 3dNow! are
for?

But you're taking a viewpoint, isolating 1 argument in that viewpoint,
and trying to invalidate the entire viewpoint based on the fact that
the one argument isn't as strong as you thought.

Reasons for compiling your own apps:
1) You get to review the code to ensure it isn't doing anything nasty.
2) You can easily tweak the code if you don't like how it behaves.
3) Aside from compiler optimizations, most software has a number of
   compile-time options you can tweak (not all related to performance)
   For example, I just recompiled Sylpheed with GnuPG support.
4) Generally, source becomes available prior to binary packages, so
   you can (usually) stay more up to date by compiling your own than
   by waiting for someone to roll binary packages.
5) Sometimes you can make software work by compiling from source and
   telling it the non-standard locations of libraries that would
   be otherwise unusable unless you upgraded a lot of other things
   and went through a lot of headaches.
6) If a security patch is released and you have source, you can patch
   and rebuild and fix the security hole very quickly.
7) Of course, there's compiler optimizations.

And these seven are just off the top of my head.  A strong argument for
compiling from source on a source-based system like Gentoo or FreeBSD is
also that it's just so easy to do, and with modern computer hardware,
it doesn't take that long.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the wplug mailing list