From owner-freebsd-stable@FreeBSD.ORG Tue Aug 28 17:13:13 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FEFF106564A for ; Tue, 28 Aug 2012 17:13:13 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id CDADB8FC1A for ; Tue, 28 Aug 2012 17:13:12 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.5/8.14.5) with ESMTP id q7SHDBTT034609; Tue, 28 Aug 2012 10:13:11 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.5/8.14.5/Submit) id q7SHDBFd034608; Tue, 28 Aug 2012 10:13:11 -0700 (PDT) (envelope-from david) Date: Tue, 28 Aug 2012 10:13:11 -0700 From: David Wolfskill To: Jamie Paul Griffin Message-ID: <20120828171311.GL10869@albert.catwhisker.org> References: <20120828153203.GC38854@kontrol.kode5.net> <20120828154621.GJ10869@albert.catwhisker.org> <20120828165315.GE38854@kontrol.kode5.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XjbSsFHOHxvQpKib" Content-Disposition: inline In-Reply-To: <20120828165315.GE38854@kontrol.kode5.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: Building the kernel and userland with llvm/clang X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 17:13:13 -0000 --XjbSsFHOHxvQpKib Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 28, 2012 at 05:53:15PM +0100, Jamie Paul Griffin wrote: > ... > Thanks David, that's helpful information. Good; that was the intent. :-) > I'll likely give it a go. So does clang create better binaries and librar= ies, in terms of performance and such-like? I'm currently reading as much a= s I can find about clang and its associated tools; however, compilers are q= uite complex software and learning about them is, for me at least, a lot to= take in.=20 > .... I don't know that it creates "better" code, but I believe that at least some of its error/warning checking may be a bit better: it certainly whines about a fair bit of GNUish code, citing (e.g.) "Tautological compares" ... and that sort of thing seems as if it's something I'd want to know about if it were my code, so I could fix it. =46rom the time (a few weeks) when I was building stable/9 with both gcc & clang (on different slices, sources updated to the same GRN), I got the impression that clang was slower (to compile) than gcc was. I note that I've had no issues at all with interoperation of executables & libraries built with gcc & clang. I consider this a Good Thing. :-) As I understand the issues, FreeBSD uses a (somewhat modified) version of the last GPLv2-licensed version of gcc, and there is strong incentive to avoid "tainting" FreeBSD with a GPLv3-licensed version of gcc. Thus, if we want to be able to move forward with our "system compiler," we have little choice but to use something other than gcc. clang appears to work, so I plan to exercise it & report issues if I encounter them. Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --XjbSsFHOHxvQpKib Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlA8/CYACgkQmprOCmdXAD1jeQCeMHHBByeKLfvYC9q13u6qs8s4 8XQAnjiPdn4hedz3XZdj0iyMSWZCQtyV =uZiY -----END PGP SIGNATURE----- --XjbSsFHOHxvQpKib--