From owner-freebsd-current@FreeBSD.ORG Wed Sep 22 06:42:07 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 CBCD7106564A for ; Wed, 22 Sep 2010 06:42:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 902708FC15 for ; Wed, 22 Sep 2010 06:42:07 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:692a:640d:c55:36cf] (unknown [IPv6:2001:7b8:3a7:0:692a:640d:c55:36cf]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 869575C43 for ; Wed, 22 Sep 2010 08:42:06 +0200 (CEST) Message-ID: <4C99A53E.7060707@FreeBSD.org> Date: Wed, 22 Sep 2010 08:42:06 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.10pre) Gecko/20100910 Lanikai/3.1.4pre MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 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: Wed, 22 Sep 2010 06:42:07 -0000 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} == "cc" CC=clang .endif .if !defined(CXX) || ${CXX} == "c++" CXX=clang++ .endif # Don't die on warnings NO_WERROR= WERROR= 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. :) Alternatively, 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.