From owner-freebsd-current@FreeBSD.ORG Thu Jun 4 12:36:00 2009 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB5CA1065675; Thu, 4 Jun 2009 12:35:59 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from mx2.itu.dk (mx2.itu.dk [130.226.142.29]) by mx1.freebsd.org (Postfix) with ESMTP id 74AD88FC24; Thu, 4 Jun 2009 12:35:59 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from [192.168.10.164] (0x573b9942.cpe.ge-1-2-0-1101.ronqu1.customer.tele.dk [87.59.153.66]) by mx2.itu.dk (Postfix) with ESMTP id 657F3F48072; Thu, 4 Jun 2009 14:35:57 +0200 (CEST) Message-Id: <31BD4D08-6558-46FF-9B93-CF8249AAC461@cederstrand.dk> From: Erik Cederstrand To: Ed Schouten In-Reply-To: <20090604093831.GE48776@hoeg.nl> Content-Type: multipart/signed; boundary=Apple-Mail-338--476216020; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v935.3) Date: Thu, 4 Jun 2009 14:35:56 +0200 References: <20090604093831.GE48776@hoeg.nl> X-Mailer: Apple Mail (2.935.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@FreeBSD.org, current@FreeBSD.org Subject: Re: Clang: now available from a SVN server near you! 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: Thu, 04 Jun 2009 12:36:00 -0000 --Apple-Mail-338--476216020 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Den 04/06/2009 kl. 11.38 skrev Ed Schouten: > You can now build your very own version of FreeBSD with Clang > installed > as /usr/bin/cc as follows: Thanks for your hard work, Ed. This is great news! You might want to mention that a few parts are still GCC-compiled due to bugs in Clang ( see http://wiki.freebsd.org/ BuildingFreeBSDWithClang). Also, it's very encouraging that the ports run you did with Erwin (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-June/005274.html ) compiles over 7000 ports with Clang. I've asked in the Clang list, but I'd like an opinion from FreeBSD folks, too: Clang supports LTO (http://llvm.org/docs/LinkTimeOptimization.html ), which has a potential for performance improvements. It doesn't work on FreeBSD because the linker we have (in binutils) doesn't know about the libLTO that LLVM provides. There's a new linker from GNU called Gold, but as far as I know it's GPLv3 licensed and therefore undesirable at least to have in base. LLVM provides a linker (http://llvm.org/cmds/llvm-ld.html ) but "it doesn't interact correctly with conventional nm/ar/etc" (http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-June/005296.html ). There's the ELF toolchain project (elftoolchain.sourceforge.net/) but a BSD-licensed ld hasn't been developed yet. What would be the best way to get LTO to work on FreeBSD? Thanks, Erik --Apple-Mail-338--476216020--