
Why people were enthused about GCC early on in its life - zdw
http://utcc.utoronto.ca/~cks/space/blog/unix/GccEarlyEnthusiasm
======
rogerbinns
There were other reasons too. I worked at a place where we ported our software
to 20 different versions of Unix[1]! gcc tended to be a lot less buggy than
vendor compilers, and what bugs there were tended to be across all platforms.

gcc's error messages were also a lot better than vendor compilers, as were
regular diagnostics. gcc -Wall was a huge boon to improving code quality.

If you were doing C++ for cross platform software, then gcc was the only game
in town. The vendor compilers were at different versions of the C++ spec, had
different libc++, tended to crash a lot, and had really bad messages. Heck gcc
even added a flag to generate warnings based on Scott Meyers' Effective C++
books.

When the vendor compiler started being sold separately, they also included
licensing daemons. Every invocation of the compiler would check with the
licensing daemon to make sure you didn't go over your license limit. The
license daemons also tended to crash or get confused, causing even more grief
trying to compile a large code base.

At the end of the day vendor compilers were unreliable, buggy, unpleasant and
a pain to work with. gcc was developer friendly and worked well. That got a
lot of enthusiasm.

[1] You can get an idea of what development was like back then
[http://www.rogerbinns.com/visionfs.html](http://www.rogerbinns.com/visionfs.html)

~~~
mcguire
" _I worked at a place where we ported our software to 20 different versions
of Unix_

If you're feeling odd or out-of-place, I'd like to point out that I had the
exact same experience in the mid- to late-'90s.

Gcc also had the major advantage of compiling _the same C_ on all of the
machines. Yes, C was standardized and _old_ at that time, but each compiler
somehow found room to be slightly different.

Not to mention that the code it generated was pretty competitive in general
with AIX's xlc and Sun's SPARC compilers.

P.S. Thanks for the licensing daemon flashbacks, dude. Thanks.

~~~
AnimalMuppet
Now I feel inadequate. I only had to deal with 8 or 10 versions.

~~~
aceperry
Now I'm feeling inadequate. Growing up in an intel dominated world, you
couldn't touch a Sparc or MIPS machine if you were a mere mortal. Everything
accessible to me was on windows, and the hard to load versions of *BSD or
linux. Nowadays, we're beginning to get access to ARM machines like the
Raspberry Pi, or 8 bit things like PICs or Atmels.

Funny thing is, high cost compilers are suddenly becoming free such as Windows
with their VS stuff. While gcc has been the gold standard, because it's been
free, newer technologies such as LLVM are also beginning to thrive in the free
and open source world. Amazing times we live in!

~~~
david-given
Good news if you're interested in PICs and MIPS --- the PIC32 architecture has
a MIPS core! And you can run RetroBSD on it:

[https://olimex.wordpress.com/2012/04/04/unix-on-
pic32-meet-r...](https://olimex.wordpress.com/2012/04/04/unix-on-pic32-meet-
retrobsd-for-duinomite/)

------
unwind
Maybe I'm weird, but I'm still enthused about GCC.

I mean come on, it's a free high-quality C compiler for almost any platform
you can dig up! That's just awesome! C hasn't died or gone away since the
1980s, and being able to compile C for such a wide range of processors and
platforms is great, in my opinion.

~~~
lmm
LLVM seems to be where the interesting action is these days, I think mostly
because it's adopted a superior modular design. GCC's technical design was
compromised by RMS' desire to keep it tightly coupled for licensing reasons,
and in the past few years the pain of that has really started to be fault.
Which is somewhat ironic considering how the free software movement started.

~~~
omega_rythm
Gcc code is arcane: it relies heavily on macros to define some kind of DSL for
the compiler backends (check out the .def files), but if you want to
contribute seriously you need to learn that DSL _and_ how it works behind the
scene somewhat, whereas llvm is C++. That being said, it's an interesting
experience to dive into that code.

~~~
nhaehnle
I give you: [https://github.com/llvm-
mirror/llvm/blob/master/lib/Target/X...](https://github.com/llvm-
mirror/llvm/blob/master/lib/Target/X86/X86InstrAVX512.td)

I agree with you that gcc is much less pleasant than LLVM+Clang, but to say
that LLVM is better becauses it uses C++ everywhere is simply incorrect. In
fact, using this kind of DSL for backend definitions _is good design_.

~~~
david-given
The LLVM DSL engine is really annoying to use, mainly because the pattern
matching engine is pretty simple, and it's possible to express patterns in the
DSL language which the pattern matching engine is unable to actually match.
Until you know where the limits are it's really frustrating; you write a
pattern which should work and the compiler blows stack or produces an
impenetrable internal error because the pattern matcher has given up or gone
into a working loop.

A large part of any LLVM backend is actually custom C++ code for matching and
expanding patterns which the pattern matcher either can't or is unwilling to
do (e.g. custom backend-specific DAG nodes). I direct you at this file:

[https://github.com/llvm-
mirror/llvm/blob/master/lib/Target/X...](https://github.com/llvm-
mirror/llvm/blob/master/lib/Target/X86/X86ISelLowering.cpp)

github will give you a warning before loading it because that single C++
source file is over a megabyte...

------
randcraw
There's another big reason to still be 'enthused' by GCC: without GCC we
wouldn't have Linux. Or Mozilla/Firefox. Or virtually all of the shareware /
freeware we largely take for granted, that frees users and developers alike
from the domination of control-freak juggernauts like Apple and Microsoft and
Oracle.

Every _day_ I'm enthused by GCC and the freedoms it spawned.

~~~
ploxiln
That is a great point. ... and without Firefox, how painful would it have been
to wrest control of the internet away from IE6? Would Apple have even had a
chance, or would they be stuck with IE5.5 for Mac? What would they base Safari
on, if there wasn't KHTML for KDE (which might not exist without gcc)? What if
Apple couldn't make an independent phone / tablet with browser, would we all
still be stuck with flash?

No way to really know what would have happened, but it's a bit scary.

(EDIT: I'm not a fan of Apple stuff due to their walled gardens, but I do
recognize their role, along with Firefox, in saving us from an IE/flash
internet and thus from a crazier Windows monoculture.)

------
chisleu
I'm still enthused about GCC!!! :)

When I started using it, The alternatives were expensive. Even the educational
version of Borland our university used was expensive (The mediocre book it
came with was ~$300!!!)

It isn't as performant or as well tested as professional compilers (that cost
tens of thousands or more!) You wouldn't expect it to be, would you?

~~~
Alupis
> t isn't as performant or as well tested as professional compilers

I don't know how true this statement is. ICC has been found to be very lacking
compared to both gcc and clang -- and I'd wager in-house testing doesn't
compare to massive world-wide deployment of gcc and clang as far as rooting
out tough bugs that crop up in weird circumstances.

~~~
michael_h
> ICC has been found to be very lacking compared to both gcc and clang

Who found that? For processing intensive tasks, I routinely get a 30%
reduction in run time using ICC - mainly owing to ICC's aggressive
vectorization.

Rarely, I'll have to do some shenanigans to force it to work correctly. _Very_
rarely.

I use clang when developing because the error messages are miles ahead of
anybody else, then produce a 'stable' GCC version and an ICC version. If the
ICC version produces the same results as the GCC version for the test suite, I
exclusively use the ICC version.

~~~
gh02t
In my experience, `icc/pc` and `ifort` give a significant speed boost for
numerical code (on Intel hardware at least), but for more general purpose code
it's not really very impressive.

However, the related products like `ipp` and `mkl` are where Intel has a real
advantage. My experience has been that `mkl` in particular is dramatically
faster than vanilla LAPACK and friends and still quite a bit faster than more
optimized variants like ATLAS. But, you don't need to use the Intel compilers
to use those libraries, you can use them with gcc as well.

------
timclark
Sun removing the C compiler from Solaris pretty much made it obligatory for my
whole university department to install GCC in the early 90s.

~~~
simonh
And if you're using a cross-platform compiler, you've no longer got any need
for a particular OS to run your software on. And now there are thousands of
university students and professors relying on gcc, and therefore willing to
devote time and effort to improve it. And oh look - this Finnish kid has just
released an open source Unix clone than runs gcc compiled software just fine,
and it's free too!

I can't really say that this decission killed sun. I don't knoe how much
revenue they got from selling cc, and they were probably toast anyway in the
long run. Their main selling point was that they were the same as all the
other versions of Unix.

~~~
ska
It's the hardware costs that killed the unix vendors relative to commodity
beige boxes, not the software Linux (and to some degree the BSD's) just gave a
smoother path.

I recall seeing side by side memory quotes from Intel (i.e. an "expensive"
vendor in the space, when they were shipping servers) and SGI for the same
amount of memory on smallish servers - from memory the SGI was about $18k vs
$500 for the intel. Staring at that difference it becomes pretty hard to
justify, even if the memory bus was much better. I could buy a couple of new
servers for the cost of that memory upgrade.

I suspect Sun's pulling the free c compiler was just one of many "cost
cutting" (which end up being revenue cutting) decisions made by a company that
saw the writing on the wall but couldn't see how to avoid it.

~~~
acveilleux
The sun C compiler was pulled in an era where the Unix workstations were (1)
very clearly superior to PCs and (2) available with _steep_ .edu discounts.

By 2000, the Unix workstation were not much faster outside of 3D hardware and
floating points and the discounted price was well above the "equivalent" PC
costs.

By 2005, the PCs had exceeded Unix workstations in every way.

The line is kinda blurry in my head but basically a 2004 vintage AMD CPU could
do in software (using MesaGL) roughly the same OpenGL performance as a '98
vintage O2 could do with a decent frame buffer. Once the nVidia drivers became
ubiquitous, that PC ran circle around all of our SGIs except for the Octane2s
(at a 10:1 price differential.)

By 2006, we were down to a single Octane2 with a busted frame buffer being
kept to avoid relicensing a numerical package for $$$$.

~~~
ska
I want to say my quote comparison came from '96, but I could be off a bit. At
any rate, the unix vendors still all had pretty significant hardware
advantages over even the beefiest PC ... but the bang/buck was already pretty
painful.

We had systems developed on Sun, but we couldn't afford to deploy them on Sun
hardware. After briefly flirting with the idea that SunOS x86 would be a
viable path, we gave up and moved to linux on commodity hardware. It was a new
enough thing to do (in the market we were in) that we got a few raised
eyebrows, but it turned out to be the right decision.

~~~
acveilleux
Yep, without .edu discount, by the time the P-Pro (mid/late 90s) came out the
value proposition was really bad.

For integer performance RISC had no benefits left by 1996-1997. 300Mhz P2 (in
a Compaq workstation) was at parity with a 250Mhz R10k (SGI O2). The P2 as a
fully assembled system was priced less than the R10k CPU alone.

Only the huge amount of cash available to dot-coms propped up Sun then. With
all the "you need sun servers for dot-coms" beliefs.

My current employer made the same call (Linux on commodity PC) around the same
time for the same reasons. It took ~8-10 years for competitors to stop using
the fact it was Linux based for FUD. Now the only issue we get is Windows-only
shop (very common in our industry) complaining that we're the only non-Windows
system they use.

~~~
yuhong
_Only the huge amount of cash available to dot-coms propped up Sun then. With
all the "you need sun servers for dot-coms" beliefs._

I wonder if Sun would have been better off if this didn't happen.

~~~
gaius
Almost certainly. Sun kit was very reliable (there's more to building a server
than putting a PC in a rackmount case) and for 5 or 10 years after the dotcom
bust, they were competing with their own second-hand kit at fire sale prices,
which was still perfectly good for the job it was sold for.

------
ptype
We should be. It's amazing that it's available free (x2). I remember when my
choice of programming language was determined by which compiler I could get
hold of. So I ended up using Turbo Pascal. The local library had some C books
but I couldn't find a compiler. (TP had an amazing IDE though for its time...)

------
cbsmith
Honestly, GCC was a pretty good optimizing compiler even on RISC
architectures. The one exception was on SPARC, because the optimizer didn't
take advantage of the "register windows" feature, which arguably is the most
un-RISCy aspect of the SPARC architecture.

RISC vendors often shipped carefully optimized floating point libraries, which
would result in floating-point optimized code from their compilers
outperforming gcc, but for fixed point performance GCC was often competitive
and even superlative to the offerings from RISC vendors. If you look through
the history of SPEC benchmarks, you'll see that for SPECint, GCC was as much
the compiler of choice for RISC vendors as it was for CISC vendors.

------
housel
In 1990-1991, in my first job, I insisted on using gcc on SunOS primarily
because I wanted to use ANSI C89 features (primarily function prototypes).
These were already available on the other two platforms we were targeting (the
Microsoft C compiler, and Apple Macintosh Programmers Workbench), and the
standard SunOS PCC-based compiler didn't support any of the new Standard C
features.

------
carlob
Honest question about grammar (not a native speaker): is enthused correct
here? Other than the fact that enthuse is a verb that was made up from
enthusiasm, shouldn't this be "Why people were enthusiastic about…", "Why
people enthused about…" or "Why people were enthused by…"?

~~~
munificent
It's correct. As an intransitive verb, the subject is the person feeling
enthusiasm. "I'm enthused to be going to Disneyland!"

As a transitive verb, the subject is the thing causing enthusiasm. "Disneyland
enthuses me!" (This formation does tend to be less common.)

~~~
carlob
Don't all verbs use have as the auxiliary in the present perfect tense? As
such I am enthused would not be an intransitive verb, but either a nominal
predicate or a passive verbal predicate. A correct intransitive form would be
"I've enthused about going to Disneyland".

In the first case enthused should be replaced by enthusiastic, which is the
correct adjective, in the second case you would use by rather than about as a
preposition for the agent. Correct?

------
4k
Where does the author establish that people are not enthused about gcc
anymore? Or does he not even imply that?

~~~
wampus
No, he's providing an alternative reason for gcc's popularity in response to
Rob Landley's email[1] that asserts that it was due to developers determined
"to avoid paying Ed Zander extra for Sun's Solaris compiler."

[1]
[http://article.gmane.org/gmane.linux.toybox/1890](http://article.gmane.org/gmane.linux.toybox/1890)

------
kokey
I do remember something about SGI making you pay extra for the C compiler for
IRIX. Perhaps they only made it free for universities.

~~~
abruzzi
Yup, they used MIPSpro compiler but it cost extra. And my recollection was
that gcc wasn't fully functional without MIPSpro installed.

~~~
opk
You didn't get the system include files without having the compiler so, yes,
gcc wasn't a full solution. Also missing without paying extra was troff so I
had to use groff just to be able to format man pages (they mostly came
preformatted).

------
bane
In college, I was excited about GCC because it was free as in beer, worked
well, and the other compilers we could use were hundreds or thousands of
dollars.

------
Kaligule
tldr: gcc was a good compiler compared with the existing alternatives, so
people used it. It also was free.

