Subject: Re: NetBSD Package system on MacOS 10.1
To: None <Port-macppc@netbsd.org, netbsd-help@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: netbsd-help
Date: 12/17/2001 23:32:39
On Mon, Dec 17, 2001 at 03:36:58PM -0800, paul beard wrote:
> On Monday 17 December 2001 10:54 am, Thor Lancelot Simon opined:
> > You appear to be suffering under the misapprehension that the fact that
> > _you can_ do something equates to the fact that _Apple does_ do that same
> > thing.
> 
> yup, that's me. it makes more sense for them to create their own tools, keep 
> 'em secret, all while keeping up the facade of an active CVS tree and the 
> usual development activities, making all their outside developers use these 
> same tools, along with the effort of creating these 200 Mb dev tool bundles.
>  
> How silly of me. Dunno how I missed that.

You appear to completely miss the point.  It makes perfect sense for them
to do what you so mockingly describe if it enables them to *give a compiler
away for free*, which they couldn't do if they only used xlc or the 
Metroworks compiler, two compilers they've demonstrably used to build parts
of their system in the past.

Now, one of those compilers (xlc) is maintained by the POWER/PowerPC folks
at IBM, and the guts of the other are maintained by the PowerPC folks at
Motorola.  GCC is maintained by... well, by a bunch of very bright, seriously
overworked volunteers who don't seem to be able to teach it to generate good
code for any modern architecture no matter what they do.  Building a good
compiler for *one* architecture is a full-time job for about as many people
as attempt to maintain GCC for N architectures, if any of the CPU vendors'
teams are to be taken as a good example.

At least parts of what Apple bundles into the base system are demonstrably
not compiled with gcc, because they contain code sequences gcc can't 
generate (e.g. vectorization using AltiVec).  Now, either Apple has loads
of hand-tuned asm everywhere (which would be silly, except in a few very
specific places), or they've compiled certain bits of things with a real
PPC compiler and link the generated .S files (or huge asm statements) into
their otherwise gcc-compiled code, or they simply use a real compiler to
build, for example, much of the multimedia stuff.

And why shouldn't they?  It doesn't cost them anything extra to ship 
binaries they build with a compiler that doesn't suck, whether they ship 
gcc for the great unwashed or not.  And if you look at how GCC does on the
various SPECcpu and SPEChpc benchmarks vis-a-vis the IBM or Motorola 
compilers, you can see that Apple has a *great* deal to lose in terms of
the performance of their systems by using GCC.

Thor