From owner-freebsd-hackers@FreeBSD.ORG Tue May 20 17:06:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79EE31065678 for ; Tue, 20 May 2008 17:06:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 41BC88FC0A for ; Tue, 20 May 2008 17:06:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8B1591CEA1; Tue, 20 May 2008 19:06:39 +0200 (CEST) Date: Tue, 20 May 2008 19:06:39 +0200 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20080520170639.GE1181@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zWzrvxVmtOAUrjYA" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Subject: FreeBSD and LLVM X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2008 17:06:40 -0000 --zWzrvxVmtOAUrjYA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everyone, First of all, for those of you who went to BSDCan, I hope you had a pleasant flight/trip back home. :-) On Saturday I went to the LLVM talk (see http://llvm.org/), which I really enjoyed. On Friday Remko Lodder and I already talked with him about the LLVM project. I was excited about the project, so I decided to give it a try at the office. At first I tried LLVM 2.2 with LLVM GCC4 4.2 from Ports, but it didn't work like expected. I won't go into many details about it. When I discussed the problems I was seeing on my system at the office, someone pointed me to the beta tarballs of the upcoming version 2.3, which I installed by patching our FreeBSD port. http://llvm.org/prereleases/2.3/ As an ideal benchmark, I decided to compile an i386 kernel using the LLVM 2.3 snapshot. I didn't expect it to happen, but it works! I was capable of successfully booting into single user mode and shutting it down safely. There is one problem however: http://llvm.org/bugs/show_bug.cgi?id=3D2267 For some reason, the inline asm support of LLVM is incomplete and causes compilation errors when generating some of the atomic functions in i386/include/atomic.h (lines 262 to 265). To work around this, I made the functions non-atomic. Silly, I know, but it was good enough to perform some basic tests. I think it would be nice if LLVM would once become our standard C compiler. LLVM currently uses GCC as its frontend, which proves to be somewhat compatible with the original GCC> --=20 Ed Schouten WWW: http://80386.nl/ --zWzrvxVmtOAUrjYA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkgzBR8ACgkQ52SDGA2eCwVAwQCfcEUS51U8d3mSYcRpQ5oTA2M9 Wn4Ani/M25lIXlGzSB9fMrwt3y+3WWF+ =1nzw -----END PGP SIGNATURE----- --zWzrvxVmtOAUrjYA--