From owner-freebsd-current@FreeBSD.ORG Tue Sep 28 22:00:27 2010 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 4F67B106564A; Tue, 28 Sep 2010 22:00:27 +0000 (UTC) (envelope-from rbgarga@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 8CBB38FC08; Tue, 28 Sep 2010 22:00:26 +0000 (UTC) Received: by wwb17 with SMTP id 17so206939wwb.31 for ; Tue, 28 Sep 2010 15:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=E6aK6drnxIYdsyqyb/Swg7CkW9aRvBNATqZ5mXEHcEw=; b=rKgV4VZaW8KOZBSsMW7WUU1Baw4xNZwgBLVfG9iZI8XYAe+zyxJki8pDKfx9smZB05 3MlXkfFDXeZHAWEEIZ71HNLTs2SE4p0oSHICUqsTac3BJw+mGvf/PoJX/wUohy6QXgya lBsds3+HWcvanxgGjODD7TDMtzgxDkM6BDjgs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=bmS4j83s6QrKfF7YnCKFq5s8QGxy1P2qcispF/FrfrVetkGoHBuRXz76XlkHP7Mldj jpoW6D/Pvg/5urj62Z6PHxMG4mGL/NIXP9mrbcHJhmT8HBPUe6FEcm3BtwlP9Yt8pw+T ukpgVVSmj1mvPxS0EcoAoJs883dmfcEZ8kqQg= Received: by 10.227.32.147 with SMTP id c19mr561383wbd.43.1285708095170; Tue, 28 Sep 2010 14:08:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.181.142 with HTTP; Tue, 28 Sep 2010 14:07:54 -0700 (PDT) In-Reply-To: <4C99A53E.7060707@FreeBSD.org> References: <4C99A53E.7060707@FreeBSD.org> From: Renato Botelho Date: Tue, 28 Sep 2010 18:07:54 -0300 Message-ID: To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: perl@freebsd.org, freebsd-current@freebsd.org Subject: Re: Clang now builds world and kernel, on i386 and amd64 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: Tue, 28 Sep 2010 22:00:27 -0000 On Wed, Sep 22, 2010 at 3:42 AM, Dimitry Andric wrote: > Hi, > > As of r212979, you should now be able to build world and kernel on i386 > and amd64 with clang, without any additional patches! > > To do so, make sure you have updated your installed world to at least > r212904 (which has the most recently imported clang/llvm snapshot), and > put the following in /etc/src.conf: > > .if !defined(CC) || ${CC} =3D=3D "cc" > CC=3Dclang > .endif > .if !defined(CXX) || ${CXX} =3D=3D "c++" > CXX=3Dclang++ > .endif > # Don't die on warnings > NO_WERROR=3D > WERROR=3D > > Both world and kernel can also be installed, and should run properly, > but please make sure you have a way to revert if anything unexpected > happens. :) =A0Alternatively, just install into a chroot to try it out > from there. > > Some additional information can be found on this wiki page: > > http://wiki.freebsd.org/BuildingFreeBSDWithClang > > Thanks to all the people that made this possible, especially Roman > Divacky, Ed Schouten, Rui Paulo, and of course the clang/llvm > developers. I built my desktop world + kernel with clang, rev. 213247 amd64, it booted perfectly, the only problem i got was something went wrong with a perl module File::Temp. To be sure it's related i'm rebuilding the src (same rev.) with gcc and will take a look if it will back to work. I'll send an email after testing. Just to show, the problem i got with perl was using this code: #!/usr/bin/perl use File::Temp; my ( $fh, $filename ) =3D File::Temp::tempfile(); print "$filename\n"; unlink $filename; with this results: Error in tempfile() using /tmp/XXXXXXXXXX: Tried to get a new temp name different to the previous value 50 times. Something wrong with template?? (/tmp/XXXXXXXXXX) at testes/tmp.pl line 5 Regards --=20 Renato Botelho