Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jan 2009 11:06:01 +0100
From:      Christoph Mallon <christoph.mallon@gmx.de>
To:        Andrew Reilly <andrew-freebsd@areilly.bpc-users.org>
Cc:        Ollivier Robert <roberto@keltia.freenix.fr>, freebsd-current@freebsd.org
Subject:   Re: gcc 4.3: when will it become standard compiler?
Message-ID:  <49672189.5060109@gmx.de>
In-Reply-To: <20090109031147.GB44317@duncan.reilly.home>
References:  <49668763.8020705@mail.zedat.fu-berlin.de>	<20090108233311.GA69883@keltia.freenix.fr> <20090109031147.GB44317@duncan.reilly.home>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Reilly schrieb:
> On Fri, Jan 09, 2009 at 12:33:11AM +0100, Ollivier Robert wrote:
>> According to O. Hartmann:
>>> When will gcc 4.3 incorporated in FreeBSD 8 and become the standard
>>> compiler suite? We figured out that gcc 4.3 does have a speed gain in
>>> some numerical code of 3 - 8 % and I guess we can use this in the basic
>>> OS as well ...
>> I'd rather have llvm instead...
> 
> I wouldn't mind that, either.  I've got the llvm port installed myself, in
> preparation for doing some experiments of my own, but haven't tried using it to
> build the kernel or user-land (or even any of the ports).  Has anyone given it a
> go?  Is it missing any crucial features?  I believe that it had different (or
> no?) support for PIC code generation, which could affect the ability to do
> shared libraries, but recent release notes seem to indicate that that's been
> addressed.

One quite important difference between GCC and LLVM is that GCC has been 
used to compile literally billions and billions of lines of code. Sure, 
LLVM has compiled many lines, too, but it's hard to beat GCC in terms of 
stability in this respect (yes, I am well aware that GCC had and has its 
share of bugs). You have to do *lots* of testing before you can honestly 
say that a compiler can really be used to compile a whole operating system.
Another aspect is that LLVM is in some parts more aggressive at 
optimisation than GCC. So sloppy code, which GCC let you get away with, 
may suddenly break - though it was wrong all along, but you just never 
noticed. Of course the code has to be fixed, but this takes time.
I'm not saying it's wrong to look for alternatives, but you cannot just 
change your system compiler like you change underwear.

> There's also someone working on a BSD-licenced retooling (ANSI/ISO-ification) of
> the PCC compiler, which is getting close to being useful as a system compiler, I
> believe. (http://www.ludd.ltu.se/~ragge/pcc/ in ports/lang/pcc)

PCC cannot seriously be considered. Its design is stuck in the 
seventies. From the point of view of compiler construction it is plain 
plain out of question. I especially was amused by the statement of the 
author who claimed PCC supports SSA - except for phi-functions.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49672189.5060109>