From owner-freebsd-current@FreeBSD.ORG Fri Jan 9 10:06:05 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E7C106566B for ; Fri, 9 Jan 2009 10:06:05 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 4F9A58FC1D for ; Fri, 9 Jan 2009 10:06:04 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 09 Jan 2009 10:06:02 -0000 Received: from p54A3E499.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.228.153] by mail.gmx.net (mp055) with SMTP; 09 Jan 2009 11:06:02 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/ypdp9cTbyqYxfNMvQ29/nozaNpIUey7Kfpynv1J jyRZ7Q/u1lUKtB Message-ID: <49672189.5060109@gmx.de> Date: Fri, 09 Jan 2009 11:06:01 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Andrew Reilly References: <49668763.8020705@mail.zedat.fu-berlin.de> <20090108233311.GA69883@keltia.freenix.fr> <20090109031147.GB44317@duncan.reilly.home> In-Reply-To: <20090109031147.GB44317@duncan.reilly.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.55 Cc: Ollivier Robert , freebsd-current@freebsd.org Subject: Re: gcc 4.3: when will it become standard compiler? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:06:06 -0000 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.