From owner-freebsd-current@FreeBSD.ORG Tue Sep 11 10:45:26 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF58E106564A; Tue, 11 Sep 2012 10:45:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 46BD58FC18; Tue, 11 Sep 2012 10:45:25 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8BAjUNh030634; Tue, 11 Sep 2012 13:45:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8BAjIP9082076; Tue, 11 Sep 2012 13:45:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8BAjI7r082071; Tue, 11 Sep 2012 13:45:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 11 Sep 2012 13:45:18 +0300 From: Konstantin Belousov To: toolchain@freebsd.org Message-ID: <20120911104518.GF37286@deviant.kiev.zoral.com.ua> References: <20120910211207.GC64920@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eDB11BtaWSyaBkpc" Content-Disposition: inline In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: current@freebsd.org Subject: Re: Clang as default compiler November 4th 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, 11 Sep 2012 10:45:26 -0000 --eDB11BtaWSyaBkpc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 10, 2012 at 04:12:07PM -0500, Brooks Davis wrote: > [Please confine your replies to toolchain@freebsd.org to keep the thread > on the most relevant list.] I do not see how removing current@ can be done, toolchain@ is not relevant for this discussion. Proposed is not a local change in the toolchain itself, but a far reaching and IMO premature change. >=20 > For the past several years we've been working towards migrating from > GCC to Clang/LLVM as our default compiler. We intend to ship FreeBSD > 10.0 with Clang as the default compiler on i386 and amd64 platforms. To > this end, we will make WITH_CLANG_IS_CC the default on i386 and amd64 > platforms on November 4th. >=20 > What does the mean to you? >=20 > * When you build world after the default is changed /usr/bin/cc, cpp, and > c++ will be links to clang. >=20 > * This means the initial phase of buildworld and "old style" kernel > compilation will use clang instead of gcc. This is known to work. >=20 > * It also means that ports will build with clang by default. A major > of ports work, but a significant number are broken or blocked by > broken ports. For more information see: > http://wiki.freebsd.org/PortsAndClang >=20 > What issues remain? >=20 > * The gcc->clang transition currently requires setting CC, CXX, and CPP > in addition to WITH_CLANG_IS_CC. I will post a patch to toolchain@ > to address this shortly. >=20 > * Ports compiler selection infrastructure is still under development. >=20 > * Some ports could build with clang with appropriate tweaks. >=20 > What can you do to help? >=20 > * Switch (some of) your systems. Early adoption can help us find bugs. >=20 > * Fix ports to build with clang. If you don't have a clang system, you > can use the CLANG/amd64 or CLANG/i386 build environments on > redports.org. >=20 > tl;dr: Clang will become the default compiler for x86 architectures on 20= 12-11-04 There was a chorus of voices talking about ports already. My POV is that suggesting to 'fix remaining ports to work with clang' is just a nonsense. You are proposing to fork the development of all the programs which do not compile with clang. Often, upstream developers do not care about clang at all since it not being default compiler in Debian/Fedora/Whatever Linux. The project simply do not have resources to maintain the fork of 20K programs. Looking from less amiable angle, you propose to knowingly break significant and important piece of the project work. My belief is that switch cannot be done before ports switch to the port-provided compiler. Another issue with the switch, which seems to be not only not addressed, but even not talked about, is the performance impact of the change. I do not remember any measurements, whatever silly they could be, of the performance change by the compiler switch. We often have serious and argumented push-back for kernel changes that give as low as 2-3% of the speed hit. What are the numbers for clang change, any numbers ? And, some small but annoying things left with clang, like ABI change requiring 16-byte stack alignment on i386, but lets ignore this until two big issues are resolved. --eDB11BtaWSyaBkpc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBPFj4ACgkQC3+MBN1Mb4gHAwCdHH6VZPlaLd/CRrpjRakb62MQ BWcAoK5mKbi5W3u6ctJFN/AZx/8pRWII =pgIm -----END PGP SIGNATURE----- --eDB11BtaWSyaBkpc--