From owner-freebsd-hackers@FreeBSD.ORG Mon May 3 12:12:53 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABD5810657FA; Mon, 3 May 2010 12:12:53 +0000 (UTC) (envelope-from hinokind@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0811A8FC17; Mon, 3 May 2010 12:12:52 +0000 (UTC) Received: by fxm15 with SMTP id 15so2323641fxm.13 for ; Mon, 03 May 2010 05:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:to:cc:subject :references:date:mime-version:content-transfer-encoding:from :message-id:in-reply-to:user-agent; bh=lzkAqEzwGUeqNtmOpOkDT4sFUEIcQyTli1lWJcPq4X0=; b=l7CGIZ3M9er3Bt1LCvwLupZF/A2ukqrBwFdaYTNoToeRBPghJJZShudIFTMNtvlAsB 4S30GWPGuiXl+2xZLP1K3Tt3+l/kTPomLMuJpX9N2JwY7uzdaCAqb7H7v7pkJiqZ7Pew z1haxyHy2UC59j2lwwX3pdaWNOqLdKvuwaqW4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; b=KXCl2oFwmdMHmheYlYgDKS2A3cdKxbIg5nWq+RnILgFRodx3iiBScSwH/jis3KjhdJ mGJfnQLWc1QzG1IgrfJh3nvFC2+DQnoYok85NTAjt2RbC6vhfhkPfGt+ecEIhdRqMh+j m2w2xLJXGwilk8+4lQiTlK/pj9I4wQ1YnfbTQ= Received: by 10.87.20.36 with SMTP id x36mr10118729fgi.14.1272888768002; Mon, 03 May 2010 05:12:48 -0700 (PDT) Received: from klevas (hst-17-80.splius.lt [77.79.17.80]) by mx.google.com with ESMTPS id d8sm14511195fga.26.2010.05.03.05.12.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 03 May 2010 05:12:47 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: =?utf-8?Q?C=2E_Bergstr=C3=B6m?= , "Peter Pentchev" References: <4BDD28E2.8010201@rawbw.com> <20100503092213.GA1294@straylight.m.ringlet.net> <4BDEA78F.90303@pathscale.com> Date: Mon, 03 May 2010 15:12:44 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable From: =?utf-8?B?QW5kcml1cyBNb3JrxatuYXM=?= Message-ID: In-Reply-To: <4BDEA78F.90303@pathscale.com> User-Agent: Opera Mail/10.10 (FreeBSD) Cc: yuri@rawbw.com, freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: GSoC: Making ports work with clang 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: Mon, 03 May 2010 12:12:53 -0000 On Mon, 03 May 2010 13:38:07 +0300, C. Bergstr=C3=B6m wrote: > I can understand from a commercial perspective why having a permissive= > licensed production compiler could be good.. I can understand why many= > people don't like gcc or fsf, but what does the BSD community get? > > 1) Performance? > 2) Robustness? > 3) ... ? Seeing how often I see this question, maybe I'll write (or force rdivacky@ to do it) an explanation why clang/llvm is good for FreeBSD. Anyway, for now, very short version: 1) Performance - in the long run, yes. gcc 4.2 in base will not be updated anymore. llvm on the other hand is actively developed and includes fancy stuff that new CPUs have. Clang also compiles stuff faster than gcc. 2) Robustness - not yet. It's still too early to rely on stability of clang/llvm, but eventually it will get better. 3) BSD-like license, C99 and eventually C++0x support. I'm too lazy to think about this right now. > What's really the goal here? To quote myself: "make clang and ports to be friendly with each other". My goals are stated in the initial email and the wiki. I'll update the wiki with some clarification on what are and what are not my goals when I have more time. > What problem are you working to solve? The problem is that ports tree is full of assumptions that compiler is gcc. At the moment, there is no way to use alternative compiler without breaking too many things. > May I humbly say that building software with a different compiler in > itself doesn't really accomplish anything. I prefer to think that compiling software with clang is making world a better place. More seriously - clang is much more strict than gcc. It forces people to write better, standard C/C++ code and not some random walls of incomprehensible text that remotely resemble C or C++, but can't even be compiled by later versions of gcc itself. I've already seen a lot of things being fixed because clang found a bug that gcc missed, or application relied on some weird gcc-specific behaviour and clang refused to compile it. > Starting early can give valuable feedback , but without actually havin= g > the resources to follow-up it's wasted effort. Well it's my effort that's wasted, I don't see how that's bad for anyone else. And I don't plan to waste anything, I've mentioned that some of the things I'm going to do over summer (and have been doing till now) aren't clang-specific. It will also help compile ports with new versions of gcc (or any other standard C/C++ compiler), and I don't think I need to explain why newer versions of software are usually better. > Is llvm at the point where it can self host BSD? You obviously aren't subscribed to freebsd-current@, are you? http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016648.htm= l > If not why not start there? It's been started some time ago, by other people. The reason I'm doing this as a GSoC project is because the person currently working on ClangBSD suggested me to do it. > Maybe identify the most used applications.. Not sure if you're talking about base system or ports here. I've mentioned that I want to get commonly used ports to work, and I've been doing something like that for some time now. If you're talking about base system, the problem isn't identifying most used applications, it's to fix whatever is still broken. Most of FreeBSD base system works with clang without problems. -- = Andrius