From owner-freebsd-current@FreeBSD.ORG Tue Sep 11 16:03:13 2012 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 2FCE01065674; Tue, 11 Sep 2012 16:03:13 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id F41DB8FC1E; Tue, 11 Sep 2012 16:03:11 +0000 (UTC) Received: by lage12 with SMTP id e12so538655lag.13 for ; Tue, 11 Sep 2012 09:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AKIvHtSqPhaTQ34UK7/nNDrdW9yzMkigpyr33RB4Rcw=; b=K18y/yJ/78kRjGjX3xMdzqINXP4lqoqo/GAks4ErZE95rE9x2ODMjRgE40Zk2L1Y3V d4p8jBHj6rU6BR0YAMz4PeA/S3G/sokhxcP7/duQ5a4tR2ni21cHFFWHVENL9Goe7WrB p82tUVvB+ARH7MyuBt8Hrw8b5EDn1ESlc4vhAgxCAmJmy5bwrihfM+znZmzhrnq9yMw4 vVBupAh/PVzKJApVTWTeFEKjVbNwIi9wgwbBWBqgLFnNN4bm0oQVcGKEu/yuF4ltePTp iOnntxRFEXNzoMiQ7GqPeuhOAPevOHJdsAEDPDSxcLqr7NEPA6KjMDK2IY9ZJ+p/mVA7 TB4w== MIME-Version: 1.0 Received: by 10.112.103.71 with SMTP id fu7mr6060464lbb.21.1347379389678; Tue, 11 Sep 2012 09:03:09 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Tue, 11 Sep 2012 09:03:09 -0700 (PDT) In-Reply-To: References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> Date: Tue, 11 Sep 2012 17:03:09 +0100 X-Google-Sender-Auth: 2OqgR0w-9ObLjq5f2kOhQ6R-WfU Message-ID: From: Attilio Rao To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Daniel Eischen , Konstantin Belousov , Roman Divacky , current@freebsd.org, toolchain@freebsd.org Subject: Re: Clang as default compiler November 4th X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 16:03:13 -0000 On Tue, Sep 11, 2012 at 4:56 PM, Garrett Cooper wrote: > On Sep 11, 2012, at 8:35 AM, Daniel Eischen wrote: > >> On Tue, 11 Sep 2012, Konstantin Belousov wrote: >> >>> On Tue, Sep 11, 2012 at 02:06:49PM +0200, Roman Divacky wrote: >>>> >>>> We currently dont compile 4680 ports (out of 23857). Top 10 ports that= prevent >>>> the most other ports from compiling together prevent 2222 ports from >>>> compilation. So if we fixed those 10 ports we could be at around 2500 = ports >>>> not compiling. Thats quite far from your claim of forking 20k programs= . >>> >>> Sorry, I cannot buy the argument. How many patches there are already >>> in the ports tree to cope with clang incompatibility with gcc ? You may >>> declare that all of them are application bugs, but it completely misses >>> the point. >> >> [ snip ] >> >>>> I believe majority of the broken ports is broken because their maintai= ner >>>> never saw them being broken with clang just because it's not the defau= lt >>>> compiler. Thus by making it the default majority of the problems would= just >>>> go away. >>> >>> Can you, please, read what I wrote ? Fixing _ports_ to compile with >>> clang is plain wrong. Upstream developers use gcc almost always for >>> development and testing. Establishing another constant cost on the >>> porting work puts burden on the ports submitters, maintainers and even >>> ports users. >> >> This is a good point! > > Alternate compilers are being used on other OS distributions, like Arch L= inux, Gentoo Linux, etc, so encouraging external developers to correct/simp= lify their Makefiles and build infrastructures is a good thing (and plus, i= t makes switching to other compilers like icc, pcc, etc easier). > > You're going to run into almost the same problem when trying to get stuff= to cross-compile for multiple targets, so there's no reason why FreeBSD/Li= nux should not strive to get others to hardcode less. > > I wouldn't consider ports to be a stopgap for the clang switchover as muc= h as correctness/performance. Broken third-party software can be fixed, but= if the underlying foundation doesn't deliver sane code or severely regress= es performance (runtime is more important than building IMO because I'd rat= her have code take a little while longer to compile if the end-result runs = faster, and ultimately runtime performance affects build performance), then= there's no point in trying to switch over yet. While this is generally true I think we need to make a distinction. To me speaking about "not compiling ports" doesn't mean anything. What are the bugs that actually prevents the vast majority of ports from compiling? (speaking of which anyone has testing their actual functionality too?) Because I really don't expect the bugs to be always the same repeated over and over, there will be some bugs depending by brain-o in the ports code and other depending by clang bugs. As kib@ rightly points out fixing indiscriminately ports is not the solution, but fixing ports when *the bug is actually in the port itself* is the right solution, otherwise fix the compiler for the other class of bugs. Did the people pushing for default clang make an assessment on the type of ports bug present? (and I see there is a lot of people aiming for it, so if the ports are splitted among several people we can get a good handle on it). Could such bugs be characterized and classified? Making such a huge change is also a matter of loosing much time on problems which don't seem directly related to it, but which infact prevent the system from working correctly. Switching to default CLANG with the current situation (20% of port not even compiling, ports compiler selection broken, libm loss of precision, performance barely analyzed in simplified scheme, etc.) is not an option in my head and people should really reconsider it, unless all these points gets properly addressed. Attilio --=20 Peace can only be achieved by understanding - A. Einstein